Search
DateTimePicker.attach Method
See Also
 






Control.attach override.

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

 Syntax

JavaScript  Copy Code

function attach ()

 Example

The following code creates a DateTimePicker programmatically:

JavaScript  Copy Code
document.addEventListener("DOMContentLoaded", function ()
{
 var tp = new ui.DateTimePicker();
 tp.theme = "gray";
 tp.interval = 3600000 / 2;
 tp.minTime = 3600000 * 7;
 tp.maxTime = 3600000 * 18;
 tp.mode = ui.DateTimePickerMode.Time;
 tp.stateChanged.addEventListener(handleStateChanged);
 tp.valueChanged.addEventListener(handleValueChanged);
 sender.element.querySelector("#timePicker1").appendChild(tp.draw());
        tp.attach();
}

 See Also