Components
Loading preview...
Composable date range picker built on React Aria DateRangePicker with DateField and RangeCalendar composition.
npx shadcn@latest add https://21st.dev/r/hero_ui/heroui-date-range-picker"use client";
import { DateRangePicker } from "@/components/ui/heroui-date-range-picker";
function CustomIcon() {
return (
<svg aria-hidden="true" height="1em" viewBox="0 0 24 24" width="1em">
<path d="M7 2a1 1 0 0 1 1 1v1h8V3a1 1 0 1 1 2 0v1h1a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3h1V3a1 1 0 0 1 1-1Zm13 8H4v8a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-8ZM5 6a1 1 0 0 0-1 1v1h16V7a1 1 0 0 0-1-1H5Zm3 7h3v3H8v-3Z" fill="currentColor" />
</svg>
);
}
export default function CustomIndicatorDemo() {
return (
<div className="flex min-h-screen w-full items-center justify-center overflow-hidden bg-background p-8">
<DateRangePicker label="Trip dates" customIndicator={<CustomIcon />} description="Replace the default calendar icon by passing custom children." />
</div>
);
}
export { CustomIndicatorDemo };