Skip to main content

Datepicker

The Datepicker control lets users select a date in a toolbar. The sections below show how to add and customize the control.

Add Datepicker​

Use the add() method of TreeCollection to add a Datepicker control to a toolbar:

toolbar.data.add({
type: "datePicker"
});

Properties​

Check the list of properties that you can set in the configuration object of a Datepicker control.

Add an icon​

Use the icon property to add an icon to a Datepicker control:

{
type: "datePicker",
icon: "dxi dxi-calendar-today",
}

Show and hide Datepicker​

The show() and hide() methods of Toolbar show and hide a Datepicker control by its ID:

toolbar.show(id);
toolbar.hide(id);

Enable and disable Datepicker​

The enable() and disable() methods enable and disable a Datepicker control by its ID:

toolbar.enable(id);
toolbar.disable(id);