getWidget()
returns the DHTMLX Calendar widget attached to a DatePicker control
getWidget(): Calendar;
Returns:
An object of the DHTMLX Calendar widget.
Example
const datepicker = form.getItem("datepicker").getWidget();
// -> DHTMLX Calendar
Related sample: Form. Get widget of control
It is possible to use methods of DHTMLX Calendar via the getWidget() method of a DatePicker control.
For example, you can show the current month in the control. To do this, you need to get the widget attached to the DatePicker control and then use the showDate() method of this widget.
const datepicker = form.getItem("datepicker").getWidget(); // -> DHTMLX Calendar
datepicker.showDate(null,"month"); // shows the current month