Date picker

Figma logo The guideline content on this page is synced with Figma and can be used as a source of truth. Open in Figma

Date pickers allow users to choose a date or a range of dates.


Anatomy

  1. Label
  2. Mandatory (optional)
  3. Container
  4. Helper text
  5. Help label
  6. Info icon (optional)
Date picker anatomy diagram showing the six component parts

States

  1. Enabled
  2. Hover
  3. Selected
  4. Error
  5. Error focused
  6. Disabled
  7. Read only
  8. Focused
Change this to a short description
Change this to a short description
Change this to a short description
Change this to a short description
Change this to a short description
Change this to a short description
Change this to a short description
Change this to a short description

Label

A label is mandatory for all text fields and should describe the field's purpose. Labels are included by default. If another element (such as a section title) already serves as a clear description, the default label can be visually hidden.

Change this to a short description

Helper text

Helper text communicates requirements and disclaimers below the field. An error message will always replace the helper text when a field validation error is triggered.

Change this to a short description

Required/optional fields

We use an asterisk to indicate a field is required.

The convention of using a red asterisk (*) in a label to denote a required field is a long-standing and widely adopted practice in User Experience (UX) and form design.

Change this to a short description
Change this to a short description

Max width

Dropdown buttons and menus have a max width of 520px.


Accessibility

Keyboard interaction

All buttons should be reachable via Tab and Shift+Tab keys. A visible focus indicator is shown on the focused control.

Change this to a short description

Specs

Date picker specifications with spacing and radius annotations

Developer reference

The following sections describe supported functionality that is not part of the Figma design specification.



Info icon

Wrap the <label> and an icon trigger in .label-with-info to place the info icon beside the label with the 8 px gap from the Figma anatomy. On hover or keyboard focus, the tooltip opens upwards (data-bs-placement="top") to reveal the supporting text.

Keep the trigger outside the <label for> so clicking the icon does not focus the input, and mirror the tooltip text into a visually-hidden element that the input references via aria-describedby — that way assistive tech users hear the same help text without depending on the tooltip.

Tooltip behaviour relies on Bootstrap's tooltip plugin (with Popper for positioning). See the Tooltips page for setup details.

Change this to a short description Pick the date the entry applies to. Future dates are allowed.

With input

An input with a simple dropdown/modal for selecting a date.

Inline date picker — single selection

The date picker can be rendered inline (without an input trigger) for choosing a single date.

Inline date picker — range selection

Inline rendering with range selection — pick a start date and an end date. Dates in between are highlighted.

Range selection with input

Select a range of dates from an input trigger. Both start and end dates appear in the input once chosen.

Month and year selection

A compact picker that lets the user choose a month and a year without selecting a specific day.


Calendar cell variants

The calendar cell appearance can be customised with modifier classes on the date picker wrapper:

  • .datepicker-square — fill cell with square borders
  • .datepicker-stroke.datepicker-square — stroke cell with square borders

Fill cell, square borders

Add .datepicker-square to the date picker wrapper.

or inline:

Stroke cell, square borders

Add .datepicker-stroke and .datepicker-square to the date picker wrapper.