Search
Calendar.selectionStart Event
See Also
 






Raised when a selection is started.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

EventDispatcher selectionStart

 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 SelectionEventArgs 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 selectionEnd event of a calendar. In the handler method we check if the name of the resource associated with this selection is "Prof. Bradley". If yes, we cancel the selection.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// attach a handler - when the calendar selection has ended.
calendar.selectionEnd.addEventListener(handleSelectionEnd);

function handleSelectionEnd(sender, args) {
    /* the args.resource property gives information about
     * the resource associated with this event */
     if(args.resource.name == "Prof. Bradley")
          {
              args.cancel = true;
          }
     
}

 See Also