Search
DateTimeView.draw Method
See Also
 






Control.draw override.

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

 Syntax

JavaScript  Copy Code

function draw ()

 Example

The following code creates a YearView, which derives from DateTimeView and handles its cellClick event:

JavaScript  Copy Code

// create an year view, showing a list of months
var monthList = new ui.YearView();
monthList.theme = theme;
monthList.commandStrip.visible = false;
monthList.render();
monthList.cellClick.addEventListener(monthSelect);
// Draw and attach the menu control.
document.body.appendChild(monthList.draw());
monthList.attach();


// event handler for the cellClick method
function monthSelect(sender, args)
{
 //handle the event
        var minValue = args.date.getMonth() - 0.5;
 var maxValue = args.date.getMonth() + 0.5;
}

 See Also