Calendar
Date grid (react-day-picker).
Import
tsx
import { Calendar } from "@cronus-ui/ui";
bash
npx cronus-ui add calendar
Date grid (react-day-picker).
import { Calendar } from "@cronus-ui/ui";
npx cronus-ui add calendar
A controlled calendar in single-select mode. Click a day to update the value.
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
// Fixed initial date keeps SSR + client identical (avoids hydration drift).const [date, setDate] = useState<Date | undefined>(() => new Date(2026, 5, 21));return (<Calendarmode="single"selected={date}onSelect={setDate}defaultMonth={new Date(2026, 5, 1)}fixedWeeksclassName="rounded-md"/>);