Components

Date Picker

The date picker and time picker components allow users to select a single instance or range of dates and times.

Overview

The date and time picker components allow users to select a single instance or range of dates and times in the past, present, or future. The kind of date you are requesting from the user will determine which date picker is best to use, where the time picker helps users select a specific time.

 

Variants

VariantUse when...
Simple date inputThe user is likely to remember the date easily, such as a birthdate.
Calendar picker The user needs to know a date’s relationship to other days, or when a date could be variable.
Time pickerAsking the user to input a specific time.

Formatting

Anatomy

Simple date input

Accordion anatomy diagram
  1. Label: Tells the user what to do with the text input field.
  2. Date field: A text input field where the user can manually type in the date.
  3. Helper text (optional): Format instructions as helper text below the field or in line with the label.

Calendar picker

Accordion anatomy diagram
  1. Label: Instructs the user what to do with the control.
  2. Date field: A text input field where the user can manually type in the date.
  3. Date format: Format instructions should appear as helper text below the field or inline with the label.
  4. Calendar icon button: Triggers calendar menu when pressed.
  5. Month controls: Allows the user to navigate through past and future months.
  6. Year controls: Allows the user to navigate through past and future years.
  7. Weekday: Days of the week.
  8. Day: Days in the month.
  9. Calendar: The menu where a date may be selected.

Time picker input

Accordion anatomy diagram
  1. Label: Instructs the user what to do with the control.
  2. Hour and minute field: A text input field where the user types the hours and minutes of the desired time.
  3. AM/PM selector: A select control that allows the user to choose AM or PM.

Content

Main elements

Label

  • Date and time pickers must include labels.
  • The labels should be clear and descriptive.

Date format

  • When using a simple date input, provide the date format in parentheses as helper text or in line with the label.
  • Avoid providing the date format as placeholder text inside the field, since it will disappear once the user begins typing.

Universal behaviors

States

The date picker input is a text input, so it has the same interactive state and behaviors as the text input component.

Simple date input

The simple date input is a customized text input field. Use this when the user is expected to input memorable date, like a date of birth. Avoid the simple date input when the user will need to use a calendar to anticipate the date.

The simple date input can include month/year or month/day/year. The formatting may be localized and rearranged in sequence of appearance.

The simple date input can also be used for approximate dates instead of exact dates. For example, the month and year a user applied for a service or made a purchase.

Accordion anatomy diagram

Calendar input

Calendar pickers allow users to navigate through months and years. They work best for recent or near future dates.

Calendar pickers default to showing today’s date when opened. Only one month is shown at a time.

Some users find calendar pickers difficult to use, so the date can also be input through typing.

Use a calendar picker when the user needs to know a date’s relation to other days, such as the day of the week or the date's proximity to today. 

Accordion anatomy diagram

Time picker

Time pickers provide the user with a text field where they can input the hour and minutes. This is accompanied by an AM/PM selector. The time field format should include the hour and minutes, such as 12:45.

Use the time picker when a specific time needs to be scheduled, such as a meeting time.

Accordion anatomy diagram