Search
DateTimeView.cellClick Event
See Also
 






Raised when a date-time cell is clicked.

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

 Syntax

JavaScript  Copy Code

EventDispatcher cellClick

 Event Data

The event handler method receives the following arguments:
sender
A Window 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 cellClick event:

JavaScript  Copy Code

var ui = MindFusion.UI;

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

function handleCellClick(sender, args)
{  

    //check if the sender is the calendar
    if ( sender == calendar )
    {
        //do something
    } 
}

 See Also