Control.draw override.
Namespace: MindFusion.Common.UI
File: DateTimePicker.js
JavaScript Copy Code |
---|
function draw () |
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(); } |