Date Picker
A button that opens a Calendar in a Popover to pick a date or a date range.
When to use
- Use when
- A form field for a date or a date range that should stay compact until opened.
- Avoid when
- The calendar should always be visible; use Calendar.
Installation
The source lands in src/components/ui/date-picker.tsx, along with any Shelf items it builds on, and .shelf/lock.json records what was installed. It's yours to edit.
Usage
Examples
Range
Pick a start and an end date.
Disabled
Built on
- Packages
@stylexjs/stylex,react-day-picker- Figma
- Optional native Figma library. See Designers.
Verified
- Size
- 1.3 kB gzipped on its own, 63 kB with the Shelf items and packages it builds on. JS and CSS in a production build, without React.
- Accessibility
- Axe passes on 6 stories
- Behavior
- 6 interaction tests in Storybook
- React Doctor
- React Doctor finds nothing