Date Picker

Forms

A native date input styled to match the design system.

For many forms a styled native date input is all you need. It gives users the platform's own calendar picker, zero extra dependencies, and clean theming out of the box.

npx shadcn@latest add date-picker

Basic usage

A calendar icon marks the field, and value is reported as a YYYY-MM-DD string.

Preview
Live

Date: none

tsx
1const [value, setValue] = useState("")
2
3<DatePicker value={value} onValueChange={setValue} />

Constraints

Pass native input props to limit the selectable range.

Preview
Live
tsx
1<DatePicker min="2024-01-01" max="2026-12-31" />

API reference

All props of the underlying Base UI primitive are forwarded. The table below documents the Shelf-specific props.

PropTypeDescription
valuestringThe controlled date in YYYY-MM-DD format.
onValueChange(value: string) => voidCalled when the date changes.
onChangeChangeEventHandler<HTMLInputElement>Native change event passthrough.
minstringThe earliest selectable date.
maxstringThe latest selectable date.
disabledboolean= falseDisables the input.