Form control: Date and Time Picker

The dateTimePicker control allows users to choose a date and time from a calendar popup with extra time picker.

Arguments

minDate (optional) Minimum allowed date
maxDate (optional) Maximum allowed date
defaultDate (optional) Default date to choose when opening the picker for the first time. Defaults to the current day at midnight (00:00)*.
*As of 10.13.0, the time part is set using defaultTime.
defaultTime (optional) Added in 10.13.0: Default time to choose when opening the picker for the first time. Defaults to midnight (00:00).
Can either be a 24-hour time (e.g. "17:00"), or "now" to use the current time.
relativeToField (optional) Related Date Picker field
relativeOperator (optional) Operator to be used when comparing related Date Picker field. Valid Operators are: lt, lte, gt, gte

Example

<field name="start_date" control="datetimepicker" relativeToField="end_date" relativeOperator="lte"/>
<field name="end_date" control="datetimepicker" relativeToField="start_date" relativeOperator="gte"/>

Screenshot of a date and time picker