Skip to main content

getWidget()

returns the DHTMLX TimePicker widget attached to a TimePicker control

getWidget(): Timepicker;

Returns:

An object of the DHTMLX TimePicker widget.

Example

const timepicker = form.getItem("timepicker").getWidget();  
// -> DHTMLX TimePicker

It is possible to use methods of DHTMLX TimePicker via the getWidget() method of a TimePicker control.

For example, you can set value for a TimePicker control. To do this, you need to get the widget attached to the TimePicker control and then use the setValue() method of this widget.

const timepicker = form.getItem("timepicker").getWidget();  // -> TimePicker
timepicker.setValue("00:39"); //set the value as a string