Status
The status of the component
Status
The status of the component
Figma component
A link to the Figma library where the component lives.
Repository
A link to the repo where the component lives.
Date and time can be combined into one picker both for selecting a single date and time or a range.
The combined Date and Time Picker ensures consistency and reduces complexity compared to using separate components.
Use a single Date and Time Picker with date-and-time type.
Avoid combining a Date Picker and a standalone Time Picker.
Provide clear labels and placeholders to distinguish fields.
Avoid using the component without a label.
The default view highlights today but does not preselect any values.
The default view shows a two-month span without preselected values.
Presets only affect date values, time remains unchanged.
Empty inputs indicate the expected format until a value is selected.
Depending on the region, the date formats can be the following:
The Clear button resets the component without closing the calendar.
The Cancel button discards changes and restores the previous state.
The Apply button confirms the current selection.
Date range selection is flexible and can begin from either the start or end date. The second selection determines whether the chosen dates are treated as a start or an end.
|
|
First Selected Input Field |
Second Date Click |
Is Range Selection Done? |
Third Date Click |
|---|---|---|---|---|
|
1 |
START ➡️ |
later than first selected |
True ✅ |
later than selected start date - changing end date ⬅️ |
|
2 |
START ➡️ |
later than first selected |
True ✅ |
sooner than selected start date - changing start date ➡️❗️end date should be selected again |
|
3 |
START ➡️ |
sooner than first selected |
False ❌ |
end date active ⬅️ |
|
4 |
END ⬅️️ |
sooner than first selected |
True ✅ |
later than selected start date - changing end date ⬅️ |
|
5 |
END ⬅️️ |
sooner than first selected |
True ✅ |
sooner than selected start date - changing start date ➡️❗️end date should be selected again |
|
6 |
END ⬅️️ |
later than first selected |
False ❌ |
start date active ⬅️ |
When users start by interacting with the time field, the flow remains consistent with date-first selection.
Clicking the time input field opens the full calendar for selecting date or time.
Clicking the time input field opens a standalone dropdown.
Provide a clear label above or next to the component that indicates the field type (e.g., Date, Date & Time, Date Range).
Use helper text to support understanding of the expected format, e.g.:
The placeholder should offer an example only and must not contain critical instructions.
Inline error messages should appear directly below the date/time input, displayed with a red icon and clear error text.
Typical error types include:
The user’s entered value should always be preserved, even if invalid, until they correct it.
If only one field in the range is invalid (e.g., the end date is invalid), the error appears below that specific field.
If the logic between the two fields is incorrect (e.g., end date < start date), the error may appear on both fields, but primarily under the one where the issue originated.
When the user leaves the input field or closes the date picker panel, run:
Errors should disappear automatically as soon as the user corrects the invalid input.
Focus should return to a logical place (typically the corrected field).
For range components: if one field is corrected and the overall range becomes valid, the associated error should be removed immediately.