Skip to Content

Date Picker

Date range picker card for booking and reporting filters: a labeled trigger opens a two-month range calendar in a popover, preset to a 20-day span built with date-fns.

Installation

pnpm dlx shadcn@latest add @01orbital/date-picker

API reference

A date range field in a card: a label and a button showing the chosen range, which opens a two-month calendar. It starts with January 20 to February 9 of the current year selected.

The label and placeholder live in COPY; the start date is START.

Prop

Type

Make it yours

  • Its words are in COPY at the top of components/blocks/controls/date-picker/index.tsx: change them there, not in the markup.
  • START, also at the top of the file, holds its lists and settings.

Built from

npm: date-fns. The CLI installs it for you.

Built from these parts. The CLI adds each one that is missing and won't replace a file you already have unless you choose to:

The shadcn parts here are their Base UI versions, and this piece uses Base UI's API. A Radix version you already have won't work with it.

Last updated on