About
Composable date range picker built on React Aria DateRangePicker with DateField and RangeCalendar composition.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds DateRangePicker to your project and fits it to your theme.
Code
How DateRangePicker is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import { Button, DateRangePicker, parseDate } from "@/components/ui/heroui-date-range-picker";
const week = { start: parseDate("2026-06-02"), end: parseDate("2026-06-06") };
const sourcePreviewCurrentValue = "Current value: 2026-06-02 -> 2026-06-06";
export default function ControlledDemo() {
const [value, setValue] = React.useState(week);
return (
<div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
<div className="controlled-demo">
<style>{`
.controlled-demo{display:flex;width:20rem;flex-direction:column;gap:12px;color:inherit}
.controlled-status{font-size:14px;line-height:20px;color:hsl(var(--muted-foreground,240 5% 64%))}
.controlled-actions{display:flex;gap:8px}
`}</style>
<DateRangePicker label="Trip dates" value={value} onChange={setValue} />
<span className="controlled-status">{value ? sourcePreviewCurrentValue : "Current value: (empty)"}</span>
<div className="controlled-actions">
<Button onClick={() => setValue(week)}>Set week</Button>
<Button variant="secondary" onClick={() => setValue(null)}>Clear</Button>
</div>
</div>
</div>
);
}
export { ControlledDemo };
















