Calendar
A calendar component that allows you to select a date or a range of dates.
Preview
Installation
bunx shadcn@latest add calendarUsage
import { useState } from "react";
import { Calendar } from "@/components/ui/calendar";
export function Example() {
const [date, setDate] = useState<Date | undefined>(new Date());
return (
<Calendar
mode="single"
selected={date}
onSelect={setDate}
fixedWeeks
className="rounded-lg border"
/>
);
}