Search
Calendar.itemDraw Event
See Also
 






Raised when an item is drawn.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

EventDispatcher itemDraw

 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 ItemEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.

 Example

The following code shows how to handle the itemDraw event:

JavaScript  Copy Code

var p = MindFusion.Scheduling;

// attach a handler - when a calendar item is drawn
calendar.itemDraw.addEventListener(handleItemDraw);

function handleItemDraw(sender, args) {
    //the args.item argument gives information about the item that was created
    if(args.item.subject == "Yoga" && args.item.startTime.dayOfWeek == 3)
      {
        //handle the event
        ..................
           
      }
}

 See Also