Raised while an item is being created.
Namespace: MindFusion.Scheduling
Assembly: Calendar.js
SyntaxJavaScript
Copy Code
|
|---|
EventDispatcher itemCreating |
Event DataThe 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 ItemModifyingEventArgs instance, which contains event data. This object will be passed to the handler function as the second argument.
ExampleThe following example attaches a handler to the itemCreating event of a calendar. In the handler method we check if the item that is being created is an all-day-event and if yes, we cancel its creation.
JavaScript
Copy Code
|
|---|
var p = MindFusion.Scheduling; // attach a handler - when a calendar item is being created function handleItemCreating(sender, args) { |
See Also