getWidget

returns the dhtmlxCalendar widget attached to a DatePicker control

object getWidget();

Returns

objectthe dhtmlxCalendar widget

Example

var datepicker = form.getItem("datepicker").getWidget();  
// -> dhtmlxCalendar

Details

It is possible to use methods of dhtmlxCalendar 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.

var datepicker = form.getItem("datepicker").getWidget();  // -> dhtmlxCalendar
datepicker.showDate(null,"month"); // shows the current month

Related sample:  Form. Get Widget Of Control

Back to top