Components
Date PickerDate Picker allows for selecting a date or a range of dates from a calendar view.

Usage
Use the Date picker to provide the user an intuitive way to pick a singular, or a range of dates.
Calendar
The Calendar and the Date picker consist of two separate components, where the former typically is triggered by the latter.
Typically the Date picker will be used to reveal the calendar and allow the user to pick a date, or dates, however the calendar can be displayed on its own or be triggered by another component.

The Calendar displayed standalone.
Select a default value when appropriate
For many situations a pre-selected date may aid the user in completing a task.


Formatting
Anatomy
The Date picker component is made up of a Calendar for picking dates, and a field similar to the Input component for displaying the currently selected date(s), or a placeholder if no selection has been made.

- Label
- Placeholder / Input text
- Calendar icon
- Container
- Help text
Label
Describes the expected input, e.g. “Select your birth date”. Keep the label text short, clear and concise, and aim to make it no longer than a few words.
Placeholder text
The place holder text can provide a hint regarding the expected format. Keep in mind that once the user starts interacting with the Date picker, the placeholder text is replaced with the user input. As such it is important to make sure important information is available in the label or help text.
Input text
The selected date provided by the user, or pre-selected by the system.
Help text
The help text is an optional field that can be used to provide additional guidance or contextual information about the expected input. Consider using the help text when extra clarification is needed for the user to complete their task.
Error text
Error text is displayed when validation fails and is used to inform the user that the selected date is incorrect, and ideally what needs to be corrected in order to achieve success.
States – Date picker
The Date picker displays interaction states similar to input fields and the select component.
The Date picker displays interaction states similar to input fields and the select component.
Default

The default state prior to user interaction, displaying a placeholder text.
Hover

On desktop devices the Date picker will react to a hovering cursor.
Focus

The Date picker is in focus and is available for accepting input.
Filled

The Date picker with a selected date, either selected by the user, or a default selection by the system.
Error

An incorrect date is selected. Attempt to prevent the user from making erroneous selections.
Disabled

The Date picker is not available for interaction.
Calendar

- Container
- Title
- Month Navigator
- Weekday
- Date cell – default
- Date cell – selected
- Date cell – current date
- Date cell – range
- Date cell – disabled
Title
A title indicating the currently selected month and year.
Month navigator
Buttons allowing the user to navigate months backward and forward.
Weekday
Indicates the weekday of the dates in the column below.
Date cells
A calendar date that can be selected, mark the current date or be part of a range.
States – Calendar
The individual date elements have a set of interaction states indicating their current status.
A single date can be in its default state, selected, part of a selected range, the current date, or disabled.
Default

In its default state is not currently selected or the current date, and is available for selection.
Hover

On desktop devices a date element will respond to a hovering cursor.
Range

Indicates that the date is part of a selected range.
Current

The current date is indicated with an outline.
Selected

A selected date – either a singular date, the start or end of a range.
Disabled

A date currently unavailable for selection.
Use consistent date formatting


Behaviour
Interacting with the Date Picker allows the user to enter a date manually. Clicking the calendar icon displays the Calendar, allowing the user to select a date or dates.
Single date
When the user interacts with a date the calendar closes and the Date picker displays the selected date. Interacting with the Date picker again will open the calendar with the selected date indicated.

Range selection
The range selector allows for picking multiple dates and requires interaction with a button for confirming selection.

Modify
The date picker is available with a solid base and as an outline variant.
When using the outline variant, be mindful of the background surface to ensure accessibility is maintained.