Calendar
A month-grid date picker built on react-day-picker, drawn as a Mac OS X iCal-style mini-month with clear-gel navigation buttons and a blue gel selected day.
Installation
Requires the theme. Register the @skeuomorph namespace and add @skeuomorph/skeuomorph first, as shown in the installation guide. The CLI also pulls it in as a dependency.
Without the namespace, install straight from the URL:
Usage
import { Calendar } from "@/components/ui/calendar"const [date, setDate] = React.useState<Date | undefined>(new Date())
return (
<Calendar
mode="single"
selected={date}
onSelect={setDate}
className="rounded-lg border"
/>
)See the React DayPicker documentation for more information.
The calendar reads today's date while rendering. In apps with cacheComponents enabled (the
create-next-app default in Next.js 16), wrap it in <Suspense> so prerendering does not fail.