Skip to content
Date & Time

Scheduler

Month-view event calendar that lays events onto day cells.

Import

tsx
import { Scheduler } from "@cooud-ui/ui";
bash
npx cooud-ui add scheduler

Examples

API Reference

Generated from the component's exported types.

SchedulerProps

Extends Omit<HTMLAttributes<HTMLDivElement>, "onChange" | "defaultValue">

PropTypeDefaultDescription
month
DateControlled visible month. Provide together with `onMonthChange`.
defaultMonth
DateInitial visible month for the uncontrolled case. Defaults to "today".
onMonthChange
(month: Date) => voidCalled with the first day of the next visible month on Prev/Today/Next.
events
SchedulerEvent[][]Events to lay out across the grid. Bucketed by calendar day.
onEventClick
(event: SchedulerEvent) => voidFired when an event chip is activated.
onDayClick
(date: Date) => voidFired when a day cell (not a chip) is activated, with that day's date.
today
DateThe day to highlight as "today". Optional and defaulting to `undefined` so server render and first client paint are deterministic — pass a stable Date (or compute one in an effect) to light up the current day without a hydration mismatch.
weekStartsOn
0 | 1 | 2 | 3 | 4 | 5 | 60Locale-aware start of the week (0 = Sunday … 6 = Saturday). Defaults to `0`, matching the Sun…Sat header.
ariaLabel
string"Event calendar"Accessible label for the grid. Defaults to "Event calendar".