API Reference
Every prop, callback and exported type of the <Calendar> component.
Data props
| Prop | Type | Default | Description |
|---|
events bindable | CalendarEvent[] | [] | The event list; edits are written back. |
date bindable | Date | new Date() | Focused date. |
view bindable | CalendarView | 'month' | Active view. |
sources | CalendarSource[] | [] | Calendar groups: color, visibility, editability. |
resources | Resource[] | [] | Columns of the resources view; events link via resourceId. |
timeZone | string | local | IANA display time zone; edits convert back to real instants. |
validRange | { start?, end? } | — | Days outside are read-only and unreachable. |
eventOverlap | boolean | true | false rejects overlapping drops/creates (timed events). |
Display props
| Prop | Type | Default | Description |
|---|
locale | string | 'en' | BCP-47 tag; drives all formats & built-in strings. |
messages | Partial<CalendarMessages> | — | Override UI strings. |
firstDayOfWeek | 0–6 | from locale | 0 = Sunday. |
weekends | boolean | true | Show Sat/Sun columns. |
weekNumbers | boolean | false | ISO week numbers. |
fixedWeeks | boolean | false | Month view always 6 rows. |
dayMaxEvents | number | 4 | Rows per month cell incl. “+N more”. |
views | CalendarView[] | all five | Toolbar view buttons. |
header | boolean | true | Render the built-in toolbar. |
theme | 'light' | 'dark' | 'auto' | 'light' | Color scheme. |
agendaDays | number | 30 | Agenda window length. |
hour12 | boolean | from locale | Clock format. |
class | string | — | Extra classes on the root. |
Time-grid props
| Prop | Type | Default |
|---|
dayStartHour / dayEndHour | number | 0 / 24 |
slotDuration / snapDuration | number (minutes) | 30 / 15 |
hourHeight | number (px) | 48 |
scrollToHour | number | 7 |
businessHours | boolean | BusinessHours | null |
nowIndicator | boolean | true |
Interaction props & callbacks
| Prop | Type | Description |
|---|
editable | boolean | Enable drag & resize. |
selectable | boolean | Enable drag-selection. |
eventDetails | boolean = true | Built-in details popover on event click (skipped when onEventClick is set). |
quickCreate | boolean = true | Built-in quick-create popover on empty click/selection (needs selectable or editable; skipped when onSelect/onDateClick are set). |
onEventClick | (instance, e) => void | Event activated. |
onDateClick | (date, allDay) => void | Empty cell / slot clicked. |
onSelect | (sel: RangeSelection) => void | Drag-selection finished. |
onEventChange | (info: EventChangeInfo) => void | Drag/resize landed; info.revert() rolls back. |
onEventCreate | (event) => void | Quick-create added an event to the bound array. |
onEventDelete | (event, occurrence?) => void | An event was removed; occurrence set when one instance of a series was deleted. |
onSeriesDetach | ({ series, detached, occurrence }) => void | “This event”: an occurrence was split into a standalone event. |
onSeriesSplit | ({ truncated, created, occurrence }) => void | “This and following”: the series was split at an occurrence. |
onRangeChange | (start, end) => void | Visible range changed (incl. mount) — fetch events here. |
onViewChange | (view) => void | View switched. |
onDateChange | (date) => void | Focused date moved. |
eventContent | Snippet<[EventInstance]> | Custom event body. |
toolbarEnd | Snippet | Extra toolbar content. |
Exported types
CalendarEvent · CalendarSource · CalendarView · EventInstance · EventChangeInfo · RangeSelection · RecurrenceRule · BusinessHours · CalendarMessages · PaletteColor · Weekday
Exported utilities
| Export | Description |
|---|
MiniCalendar | Standalone month picker component. |
parseRRule / expandRecurrence | Recurrence parsing & expansion. |
detachOccurrence / excludeOccurrence / splitSeries | Pure series-edit helpers (“this event” / “this and following”). |
parseICS / toICS | iCalendar (.ics) import & export. |
serializeRRule | RecurrenceRule → RRULE string. |
toZoned / fromZoned | Display-time-zone conversion helpers. |
expandEvents | Events → concrete instances for a range. |
layoutDay / layoutWeekRow | The pure layout algorithms. |
en / zhCN / messagesForLocale / localeFirstDay | i18n helpers. |
addDays, startOfWeek, monthGrid, … | Zero-dependency date helpers. |