Date picker preview

Date picker

A date field that opens a month calendar, plus the Calendar on its own, with the full WAI-ARIA grid keyboard model.

  • Group
    Pickers
  • Origin
    Inspired · Original (this library)
  • License
    MIT
  • Added
    Oct 22
npx shadcn@latest add @deank/date-picker

The registry stays private. Install from the repo with a GitHub token — see the README.

Usage

import { DatePicker } from "@/registry/components/date-picker/date-picker";

<DatePicker label="…" />

Props

PropTypeDefaultDescription
labelstring
placeholder?string"Pick a date"
format?Intl.DateTimeFormatOptions{ month: "short", day: "numeric", year: "numeric" }Intl options for the field text
defaultOpen?booleanfalseKeep the calendar open (docs and previews)

When to use

Picking one day near today (due dates, bookings, filters), with min / max and disabled days.

When not to use

Dates of birth or far-away years (use three selects or a typed field); date ranges (not supported yet); times.

Related

Text field · Segmented control · Empty calendar