Search
YearView.attach Method
See Also
 






Control.attach override.

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

 Syntax

JavaScript  Copy Code

function attach ()

 Example

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

JavaScript  Copy Code

// create a YearView, showing a list of years
var yearList = new ui.YearView();
yearList.theme = theme;
yearList.commandStrip.visible = false;
yearList.render();
yearList.cellClick.addEventListener(yearSelect);
// Draw and attach the menu control.
document.body.appendChild(yearList.draw());
yearList.attach();


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

 See Also