Search
Calendar.buttonClick Event
See Also
 






Raised when a navigation button is clicked.

Namespace: MindFusion.Scheduling
File: Calendar.js

 Syntax

JavaScript  Copy Code

EventDispatcher buttonClick

 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 ButtonEventArgs 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 buttonClick event of a calendar. In the handler method we check the button that has triggered the action and cancel it.

JavaScript  Copy Code

// attach handler - click of a button
calendar.buttonClick.addEventListener(handleButtonClick);

function handleButtonClick(sender, args) {
    if(args.button == doNotAllowButton)
      {
          //cancel the action
          args.cancel = true;
      }
}

 See Also