Search
Calendar.taskReminderTriggered Event
See Also
 






Raised when an task remider is triggered.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

EventDispatcher taskReminderTriggered

 Event Data

The event handler method receives the following arguments:
sender
A Calendar instance, which is the source of the event. This object will be passed to the handler function as the first argument.
args
A TaskEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following example attaches a handler to the taskReminderTriggered event of a calendar. In the handler method we check if the task status is "Completed". If yes, we cancel the action.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// attach a handler - when the reminder of a calendar task is triggered.
calendar.taskReminderTriggered.addEventListener(handleTaskReminderTriggered);

function handleTaskReminderTriggered(sender, args) {
    /* the args.task argument gives information about
     * the task whose reminder was triggered */
     if(args.task.status == p.TaskStatus.Completed)
            args.cancel = true;
     
}

 See Also