Installation
Theme
Mode

Forms & input

Date & time picker

One composable control for due dates, ranges, time, and recurrence — designed for dense, keyboard-driven project planning. Opens from any input as a popover, or embeds inline.

$npx shadcn@latest add @orbit/date-picker

Modes

Six modes, one component — switch behaviour with a single mode prop. Every demo below is fully interactive and pins today to Jun 24, 2026 for a stable calendar.

mode="single" — the default. A due date or milestone; opens to today and highlights the current selection.
June 2026
Mo
Tu
We
Th
Fr
Sa
Su
Jun 24, 2026
mode="range" — dual-month view with a connected fill band, hover preview while picking the end date, and a shortcut rail for common windows like "Last 7 days".
Shortcuts
June 2026
Mo
Tu
We
Th
Fr
Sa
Su
July 2026
Mo
Tu
We
Th
Fr
Sa
Su
Jun 24 – Jul 2, 2026
mode="datetime" — calendar paired with a scrollable time column in 15-minute steps, auto-scrolled to the selection.
June 2026
Mo
Tu
We
Th
Fr
Sa
Su
Time
Jun 24, 2026 · 3:00 PM
mode="time" — a standalone time list for durations, reminders, and daily standup slots.
Time
3:00 PM
mode="presets" — a shortcut rail beside the calendar: one click for Today, Tomorrow, This weekend, and more.
Shortcuts
June 2026
Mo
Tu
We
Th
Fr
Sa
Su
Jun 24, 2026
mode="recurring" — a repeat rule derived from the chosen date: daily, weekdays, weekly, monthly, or annually. Shown with openRepeat so the rule menu is visible.
June 2026
Mo
Tu
We
Th
Fr
Sa
Su
Jun 24, 2026 · Weekly on Wed

Popover

Set display to popover to anchor the panel beneath a 34px trigger field. Outside click and Escape close it; Apply confirms and closes; selection text uses tabular figures so values never shift width.

Click a field to open the full panel anchored beneath it.

Trigger states

The input that summons the popover. Error accepts a string that doubles as the help text; clearable adds an inline reset.

Default
Filled
Clearable
Error

A due date is required

Disabled
Small (30px)

Controlled

Pass value + onValueChange to own the state. Single-date modes report a Date (datetime encodes the time in it); range reports { start, end }.

value: Wed Jun 24 2026

Props

PropTypeDefaultDescription
mode"single" | "range" | "datetime" | "time" | "presets" | "recurring""single"Behavior and panel layout — calendar, dual-month + shortcuts, time column, repeat rule.
display"inline" | "popover""inline"Embed the panel inline, or anchor it to a trigger field as a popover.
valueDate | { start, end } | nullControlled value. Date for single modes; { start: Date | null, end: Date | null } for range.
defaultValueDate | { start, end } | nullInitial value when uncontrolled.
onValueChange(value) => voidFires on every selection — day, time, preset, or clear.
repeat / defaultRepeat"none" | "daily" | "weekday" | "weekly" | "monthly" | "yearly" | "custom""weekly"Repeat rule for mode="recurring" — controlled or uncontrolled, with onRepeatChange.
openRepeatbooleanfalseRender the recurring mode with its repeat menu already open.
todayDatenew Date()The accent-ringed "today" and the anchor for presets and the default view. Pass a fixed date for stable demos.
placeholderstringper modeTrigger text when empty — defaults to "Set due date", "Set date range", etc.
size"sm" | "md""md"Trigger height: sm 30px · md 34px.
errorboolean | stringDanger trigger styling; a string also renders as help text below the field.
disabledbooleanfalseDisables the trigger.
clearablebooleanfalseShows an inline × on the trigger that resets the value.
open / defaultOpen / onOpenChangeboolean / boolean / (open) => voidPopover open state — controlled or uncontrolled (display="popover").
…restHTMLAttributes<HTMLDivElement>Everything else is forwarded to the root element, including ref.

Usage

Do

Open to the most likely date

Default to today or the next business day so the common case is a single click.

Don’t

Open to an empty, far-off month

Forcing users to navigate back to “now” adds friction to every entry.

Do

Offer presets for common ranges

“Last 7 days” and “This month” save repetitive month-by-month clicking.

Don’t

Split date and time apart

Keep them in one popover — two disconnected fields invite mismatched values.

Keyboard & accessibility

The day grid uses role=grid with a roving tab stop; arrow keys move across days and months shift automatically to keep the focused day visible. The popover returns focus to the trigger on close, and every control shows the 3px themed focus ring.

← ↑ → ↓Move between days
EnterSelect focused day
EscClose the popover
⇞ ⇟Previous / next month
TabMove to presets & actions
Clear the value