Skip to content

Date picker

A date field with a calendar; single dates or ranges.

October 2026
MoTuWeThFrSaSu
Date pickerLive · light and dark follow the theme switch

Add the source to a shadcn project

npx shadcn@latest add https://docs.atomus.io/r/date-picker.jsonOpen in v0

Installs the component source, its CSS and the Atomus tokens into components/atomus/. How the registry works

From guidelines/components/date-time-pickers.md · Open in Figma: DatePicker · Calendar

Properties, variants and anatomy of the Figma components. React props use the same names.

Calendar dropdown: single date or range.

Variants: 2

Property Type / options
Type Single · Range

Date field that opens the Date picker.

Variants: 5

Property Type / options
Label text
State Default · Focused · Filled · Disabled · Error

Day cell for calendars and date pickers.

Variants: 7

Property Type / options
Day text
State Default · Hover · Today · Selected · In range · Outside · Disabled
import { DatePicker, Calendar } from '@stanvision/atomus-react';
<DatePicker label="Due date" value={date} onChange={setDate} />
<Calendar type="range" range={range} onRangeChange={setRange} />

A date field that opens a calendar. Calendar is exported on its own for inline use.

Full types and defaults are in React API at the end of the page.

  • type single (with value / onChange) or range (with range / onRangeChange); dates are ISO strings like 2026-10-14.
  • label, hint, error, placeholder, min, max, weekStartsOn (Monday by default), locale.
  • Keyboard: arrow keys move by day and week, PageUp / PageDown by month, Enter picks, Esc closes.

From the Figma guidelines.

Do

  • Show today and the selected range clearly.
  • Let people type the date in Date input.
  • Offer presets for common ranges.

Forbidden

  • Never hide the year when a range crosses years.
  • Never disable past dates unless the task requires it.
  • Never make people click through a calendar for birth dates — use Date input.

Generated from react/src/components by scripts/gen-react-api.mjs — the same tables agents read in guidelines/components/date-time-pickers.md.

Use only these props; anything else is not part of the API.

Figma: Date input + Date picker. A field that opens the calendar in a popover.

import { DatePicker } from '@stanvision/atomus-react'; — source: react/src/components/DatePicker.tsx

Prop Type Default Description
type 'single' | 'range' 'single' Figma: Date picker Type
value ISODate | null — Controlled value.
range DateRange — Selected range (type=“range”).
onChange (value: ISODate) => void — Called with the new value.
onRangeChange (range: DateRange) => void — Called with the new range (type=“range”).
min ISODate — Earliest selectable date.
max ISODate — Latest selectable date.
weekStartsOn 0 | 1 1 Monday-first by default
locale string — BCP 47 locale for month and weekday names.
label string — Figma: Date input — Label
hint string — Help text under the field.
error string — Error message; replaces the hint and marks the field invalid.
placeholder string — Placeholder text — never a replacement for the label.
size 'sm' | 'md' | 'lg' 'md' Size.
disabled boolean — Disables the control.
id string — Element id; generated when omitted (wires label and hint).
defaultOpen boolean — Start open (docs and tests)
className string — Extra class on the root element (layout only — never restyle colours or sizes).

Accepts only the props above.

ISODate — Dates are ISO strings ‘YYYY-MM-DD’ (no time zones):

type ISODate = string;

DateRange:

Field Type Description
start ISODate | null
end ISODate | null

Figma: Date picker body with Calendar day cells (Default, Today, Selected, In range, Outside, Disabled). Arrow keys move days, PageUp/PageDown move months.

import { Calendar } from '@stanvision/atomus-react'; — source: react/src/components/DatePicker.tsx

Prop Type Default Description
type 'single' | 'range' 'single' Figma: Date picker Type
value ISODate | null — Controlled value.
range DateRange — Selected range (type=“range”).
onChange (value: ISODate) => void — Called with the new value.
onRangeChange (range: DateRange) => void — Called with the new range (type=“range”).
min ISODate — Earliest selectable date.
max ISODate — Latest selectable date.
weekStartsOn 0 | 1 1 Monday-first by default
locale string — BCP 47 locale for month and weekday names.
className string — Extra class on the root element (layout only — never restyle colours or sizes).

Accepts only the props above.

ISODate — Dates are ISO strings ‘YYYY-MM-DD’ (no time zones):

type ISODate = string;

DateRange:

Field Type Description
start ISODate | null
end ISODate | null