DatePicker and DateRangePicker: a field that opens a calendar, with presets and clear.
Date picker default
Install
npx shadcn add @syncrobotic/date-selector Also installs: react-day-picker@^10, date-fns, lucide-react, @syncrobotic/cn, @syncrobotic/calendar, @syncrobotic/field, @syncrobotic/popover
Overview
Form fields that open a calendar: DatePicker for one day and DateRangePicker for a from–to range.
When to use
- A day or range in a form or a filter bar.
- Event and report ranges with presets.
Use something else
- A calendar that is always visible: Calendar.
- A time: Time picker.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Date picker in field
Date picker future only
Date picker presets
Date picker error
Date picker disabled
Date range picker default
Date range picker presets
Date picker short format
Date picker weekdays
Date range picker one month
Date range picker error
Usage rules
- The trigger reads like an input and shows the date in words.
- Presets for the ranges people pick most (Last 7 days).
- Inside a Field it takes the label, note and error.
Changelog
- 0.25.02026-11-21Runs on react-day-picker 10: update it together with @syncrobotic/calendar and run npm i react-day-picker@^10; its props, look and keyboard are unchanged. Import calendarLocale per language, as v10 documents it: import { zhTW } from "react-day-picker/locale/zh-TW" (react-day-picker/locale still exports it).
- 0.23.02026-11-20Every word it says can be translated without editing the source:
labels(pickDay,pickRange,clear,presets).localewrites the trigger's day with Intl ("2026年11月3日") unlessdisplayFormatis given;calendarLocaletakes a react-day-picker locale for the calendar. Without them nothing changes. - 0.17.32026-11-19Disabled: the field keeps its grey fill with a --border edge, so in dark mode it no longer looks enabled; its words use the new --disabled (3:1 on every surface).