Skip to content

Date Picker

The calendar view should use button semantics for days, with grid semantics for keyboard navigation and announcements.

Quarantine

A Date Picker is a form input component that lets users enter or select a date. It combines a text field (for direct entry) with a calendar popup (for visual selection), so users can complete the task with either keyboard-first or pointer-first behaviour. The component is fully responsive and designed to be used across mobile, tablet, and desktop without separate variants.

March 2026

Mon
Tue
Wed
Thu
Fri
Sat
Sun
  1. Calendar
  2. Header
  3. Navigation Button
  4. Weekdays
  5. Selected day

Use the Date Picker when:

  • The user needs to select a specific calendar date (for example, a preferred test-drive day).
  • The date is in the near future or recent past and calendar context improves selection confidence.
  • Input must be constrained to a valid date range (min/max dates).
  • Date format consistency is required for downstream processing.

Avoid the Date Picker when:

  • Only a month or a year is required.
  • The interaction is relative rather than absolute (for example, “in X days”).
  • There is no persistent, visible label associated with the field.

State

Rested, Hover, Active, Disabled, Focus, and Error. Active opens the calendar while keeping typed input available; Focus highlights the currently edited field for keyboard users without opening the popup; Error appears after blur when the value is invalid.

Required

A boolean that marks the field as mandatory. The label reflects the required state visually and through the form submission semantics.

Helper text

Optional text beneath the field — use it to show the expected date format with a concrete example. The component swaps in an error message in the same slot when validation fails.

Calendar icon

A trailing calendar icon doubles as the trigger that opens the popup. It defaults off in the rested state and on in the error variant so the error indicator can take its place.

Calendar popup

The month/year grid that opens on click or tap. Day cells expose full dates via aria-label, disabled or unavailable days remain visible but non-selectable, and the current day carries a distinct outline.

Desktop

The calendar opens beneath the input. Keyboard interaction covers the field, the trigger, month navigation, and day cells — focus moves into the popup when it opens and returns to the trigger on close.

Tablet

Same behaviour as desktop. Make sure the popup has enough room to render below the input without clipping; flip above when needed.

Mobile

Keep both paths available — typed input shouldn’t disappear in favour of calendar-only on smaller screens. The calendar popup may shift to a sheet pattern but still respects focus and aria-label semantics.

Treat the picker as a dual-path control — typing and tapping should both work all the way through.

Do

Keep both interaction paths available (typed input and calendar selection), validate on blur and provide a clear error message that includes the expected format, use helper text to show a concrete example date, and keep disabled and unavailable dates visible but non-selectable inside the calendar.

Don't

Don’t hide or replace the persistent label with placeholder-only text, don’t rely on colour alone for the error or selected state (pair it with an icon or copy), don’t force calendar-only interaction for keyboard and assistive-tech users, and don’t trigger validation errors while users are still typing.

Make the label specific to the date you’re asking for (“Preferred test-drive date”, not just “Date”). Use the helper text to demonstrate the expected format with a real example (“DD/MM/YYYY — 25/12/2026”) so the user can match the pattern before the picker opens. Error copy should name the rule that failed (“Pick a date after today”) rather than restating the field — pair it with the error icon so the message reads without colour alone.