The date/time input control allows users to select a date, time, or both, from a corresponding pad. However, SAP Fiori uses this control for time input only. Do not use this control for entering a date or a combination of date and time (see the Usage section below).
Use the date/time input if:
- You want a control to enter the time.
Do not use the date/time input if:
- You want a control to enter a date. In this case, use the date picker as it supports keyboard entry.
Responsiveness and Adaptiveness
The date/time input runs on all form factors and therefore works on all devices.
Behavior and Interaction
Selecting a Time
By clicking or tapping the date/time input field, the date/time input appears. The user can select a time by rotating the wheel.
When the user clicks the OK button, the popup/popover closes and the selected date and/or time appears in the input field. When the user clicks Cancel, the action is aborted and the input field remains unchanged.
Set the default values of the date/time input carefully to avoid unnecessary scrolling. It often makes sense to set the default for the time to the full or half hour, setting the minutes to 00 or 30. Sometimes it may also make sense to use the current time.
The control may only be used to display and select a time or a duration (property: type).
If you need a control to enter a date/time combination and two separate fields are not enough, you can use the date/time input to support this combined input.
Keyboard entry is not supported by the date/time input control.
Want to dive deeper? Follow the links below to find out more about related controls, the SAPUI5 implementation, and the visual design.