Skip to Content

Date Range Picker

Date range picker field: an outline button showing the formatted range opens a popover with a two-month range Calendar. Works controlled or uncontrolled and formats dates with date-fns.

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

Usage

import { DateRangePicker } from "@/components/forms/date-range-picker"

// Fixed dates, so the server and the browser render the same range.
const STAY = { from: new Date(2026, 10, 12), to: new Date(2026, 10, 20) }

export default function DateRangePickerDemo() {
  return (
    <DateRangePicker
      label="Stay"
      placeholder="Pick your dates"
      defaultValue={STAY}
      className="w-full max-w-xs"
    />
  )
}

Examples

New

date-range-picker-cabin-booking

date-range-picker-cabin-booking

Cabin Booking

Booking form example showing the DateRangePicker: a booking slip with an orchard-house masthead and a single-month range picker for choosing check-in and check-out dates.

pnpm dlx shadcn add @01orbital/date-range-picker-cabin-booking

API reference

Prop

Type

It also accepts the HTML attributes of the element it renders.

Dependencies

npm: @phosphor-icons/react, date-fns, react-day-picker. The CLI installs them for you.

Registry pieces it installs with it: