Search
DateTimeView.buttonClick Event
See Also
 






Raised when a button in the command strip is clicked.

Namespace: MindFusion.Common.UI
File: DateTimeView.js

 Syntax

JavaScript  Copy Code

EventDispatcher buttonClick

 Event Data

The event handler method receives the following arguments:
sender
DateTimeView 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 creates a calendar and handles its buttonClick event:

JavaScript  Copy Code

var ui = MindFusion.UI;

var calendar = new ui.Calendar(document.querySelector("#cal"));
calendar.theme = "gray";
calendar.buttonClick.addEventListener(handleButtonClick);
calendar.render();

function handleButtonClick(sender, args)
{  

    //if the next button has been clicked
    if ( args.item.tooltip == "Next" )
    {
        //do something
    } 
}

 See Also