
A date picker enables the user to enter a date or date/time value into an interface or form.
A date picker enables the user to enter a date value into a form or interface. They are commonly used for:
Date pickers allow only a single value, not a range. You can use two date pickers together to receive a date range.
The date picker can accept either a date (default) or a date-time value.
Note: separate date range picker and time field components are planned for a future release.

A date picker component has:
An error message can also be displayed below the description when needed.
The date picker supports the following states:

Design system components are published in a Figma library. Install the library and add it to your project to start using this component.
Note that if using a date picker to accept a date/time value, only the date can be selected via the calendar popover. The time will default to midnight on the selected date, and the user must edit it manually. Consider collecting the time via a separate input unless your use-case requires a complete date/time string.
If needed, you can disable the calendar button and its associated popover. This is not recommended for most use-cases.
If your use case requires hiding the input label, you must also provide a non-visible label using the aria-label property.
| Control | Options | Description |
|---|---|---|
| Size |
|
Toggles between the default (medium) input size and a more compact version with reduced height and smaller typography |
| State |
|
Toggles between different interaction states |
| Show label |
|
Toggles on/off the label above the input |
| Required |
|
Toggles display of a "required" label next to the input label |
| Format label |
|
Toggles display of additional helper text explaining the expected date format |
| Description |
|
Toggles on/off the description below the input |
| Show calendar |
|
Toggles display of the button to open a calendar in a popover |
Detailed technical documentation, interactive previews and code samples are published in the B.C. Design System Storybook.
A date picker receives a date or date/time value as an ISO 8601 string.
By default, a date picker renders with the en-CA locale. This is used to set the date format. Alternatively, you can allow the date picker to set the date format, calendar system and time-zone automatically based on the user's browser locale, using the @internationalized/date package.
The number field component is a styled version of the React Aria date picker component. Refer to the React Aria documentation for detailed information about its API and supported props.
These summaries reflect the component used as provided. If you modify it, confirm that your changes comply with the Web Content Accessibility Guidelines (WCAG). B.C. government digital services are required to meet the WCAG Level AA standard.
| Requirement | WCAG Success Criterion | Validation |
|---|---|---|
| Make sure visual formatting is represented in the backend code | 1.3.1 (Level A) |
Label and input field are automatically associated via an aria-labelledby attribute |
| Clearly define the purpose of input fields | 1.3.5 (Level AA) |
The input has a visible label, used to explain its purpose. Note: if you hide the visible label, you must use aria-label to provide a semantic label |
| Make websites keyboard accessible | 2.1.1 (Level A) |
Input field, calendar button and popover are focusable and fully operable using only the keyboard, with visual indicators for focused elements |
| Prevent keyboard navigation traps | 2.1.2 (Level A) |
When in focus, the user can exit the input field by pressing the 'Tab' key. User can open, navigate and close the calendar popover using the keyboard |
| Show where the keyboard is active on the screen | 2.4.7 (Level AA) |
Focus is indicated with a visible and offset secondary border around the input field, calendar button and individual items inside the calendar popover |
| Make sure interaction or click targets meet a minimum size | 2.5.8 (Level AA) |
The input field has a minimum target area of 32px by 32px |
| Ensure user interface components behave predictably | 3.2.1 (Level A) |
Input value does not change and is not submitted on focus |
| Make sure components can be read and used by assistive technology | 4.1.2 (Level A) |
The input field is automatically associated to its label via an aria-labelledby attribute, and has the input role |