Search
MonthView.attach Method
See Also
 






Control.attach override.

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

 Syntax

JavaScript  Copy Code

function attach ()

 Example

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

JavaScript  Copy Code

/ create a month view, showing a list of months
var monthList = new ui.MonthView();
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() - 1;
 var maxValue = args.date.getMonth() + 1;
}

 See Also