Forms
Navigation & layout
Data display & feedback
Date & time
Browse components
← All components
Date Range Picker
Popover that picks a start and end date.
Install
npx shadcn@latest add https://ui.anuragroy.dev/r/date-range-picker.jsonPreview
Loading preview…
Installation
Add the component from this site. The shadcn CLI fetches the registry JSON over HTTPS — no named registry submission required.
Terminal
npx shadcn@latest add https://ui.anuragroy.dev/r/date-range-picker.jsonGitHub fallback if the website is down:
Terminal
npx shadcn@latest add https://raw.githubusercontent.com/anurag-roy/ui.anuragroy.dev/main/public/r/date-range-picker.jsonUsage
Import paths follow your components.json aliases. After install, the default path is @/components/ui/date-range-picker.
Import
import { DateRangePicker } from "@/components/ui/date-range-picker"example.tsx
import { DateRangePicker } from "@/components/ui/date-range-picker"export function Example() { return <DateRangePicker />}API Reference
DateRangePicker
| Prop | Type | Default |
|---|---|---|
| value | DateRange | — |
| defaultValue | DateRange | — |
| onValueChange | (range) => void | — |
| placeholder | string | "Pick a date range" |
| disabled | boolean | — |
| dateFormat | string | "LLL dd, y" |
| numberOfMonths | number | 2 |
- numberOfMonths — Months shown in the popover calendar.