Atelier UI

Search components…

Search components…

Date Picker

Date picker and standalone calendar with keyboard navigation, locales and disabled dates.

Edit in sandbox

Copy a prompt for your AI coding tool with the source, dependencies and usage

Props

CalendarProps

Also accepts all props of Omit<React.ComponentProps<"div">, "onSelect" | "defaultValue">

PropTypeDefaultDescription
valueDate | null——
defaultValueDate | nullnull—
onSelect(date: Date) => void——
weekStartsOn0 | 110 = Sunday, 1 = Monday
localestring"en-US"BCP 47 locale for month and weekday names
disablePastbooleanfalseDays before today can't be picked
isDateDisabled(date: Date) => boolean——

DatePickerProps

Also accepts all props of Omit<CalendarProps, "onSelect" | "onChange">

PropTypeDefaultDescription
onChange(date: Date) => void——
placeholderstring"Pick a date"—
defaultOpenbooleanfalseOpens on first render without moving focus, handy for previews

Install

$ npx shadcn@latest add https://chromotion.dev/r/date-picker.json

The CLI installs the base component; your customizations live in the code generated on the Customize tab.

More like this