Menu

Date picker

Month calendar. 2 types.

October 2026

Installation

$ npx uix-ui@latest add date-picker

This copies the file into components/ui/date-picker.tsx in your project. npx shadcn@latest add @uix/date-picker works too.

Usage

date-picker.tsx
import { DatePicker } from "@/components/ui/date-picker";

<DatePicker type="range" month={new Date(2026, 9, 1)} defaultValue={{ from: new Date(2026, 9, 12), to: new Date(2026, 9, 16) }} weekStartsOn={0} />

Examples

Date range

October 2026

Props

PropTypeDefaultDescription
typesingle | range"single"
valueDateRange–Selected day, or the start and end of a range (controlled).
defaultValueDateRange–
onValueChange(value: DateRange) => void–
monthDate–Month shown first.
weekStartsOn0 | 110 = Sunday, 1 = Monday.
localestring–BCP 47 tag for month and weekday names.
showFooterbooleanfalseSummary and Cancel / Apply buttons under the calendar.
onCancel() => void–
onApply(value: DateRange) => void–

Everything else is passed to the root element, so className, aria-* and event handlers work as usual.

Dependencies

Installed for you by the CLI.

  • class-variance-authority
  • clsx
  • tailwind-merge
  • lib/utils.ts
  • components/ui/icons.tsx
esc

↑↓ to navigate · ↵ to select · esc to close