Search
ItemModifiedEventArgs.oldItem Property
See Also
 






Gets the Item before the modification has occurred.

Namespace: MindFusion.Scheduling
File: EventArgs.js

 Syntax

JavaScript  Copy Code

get oldItem() {}

 Property Value

Item. The Item before the modification has occurred.

 Example

The following example attaches a handler to the itemModified event of a calendar. In the handler method we check if the subject of the old item is "Conference". If it is, we cancel the action e.g. the item was not modified.

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// attach a handler - when a calendar item is being modified.
calendar.itemModifying.addEventListener(handleItemModifying);

function handleItemModifying(sender, args) {
    /* the args.item argument gives information about
     * the item before the user tried to change it. */
     if(args.oldItem.subject == "Conference")
          {
              args.cancel = true;
          }
     
}

 See Also