Search
Calendar.itemModified Event
See Also
 






Raised when an item is modified.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

EventDispatcher itemModified

 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
An ItemModifiedEventArgs 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 itemModified event of a calendar. In the handler method we check if the item was dragged to another location. If so, we save its previous start date.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// attach a handler - when a calendar item is modified.
calendar.itemModified.addEventListener(handleItemModified);

function handleItemModified(sender, args) {
    /* the args.action argument gives information about
     * the action that was performed on the item */
     if(args.action == p.ItemModifyAction.Drag)
          {
              var oldStartDate = args.oldItem.startTime;
          }
     
}

 See Also