API
EventInput
Every field of an event and of the recurrence it can carry.
Fields
Type
type EventInput<TData = unknown> = { id: string start: string end?: string duration?: string allDay?: boolean timeZone?: string recurrence?: RecurrenceInput<TData> data?: TData }
| Field | Type | Description |
|---|---|---|
id | string | Your own id. It comes back on every box and bar as data-event-id. |
start | string | An ISO-8601 date or date-time. A bare date makes the event all-day, and it is also the anchor a recurrence rule counts from. |
end | string | Wins over duration. Exclusive for an all-day event. |
duration | string | An ISO-8601 duration. Date units are calendar arithmetic, clock units are exact. |
allDay | boolean | Forces a timed event into the all-day lanes. |
timeZone | string | The zone this event is read in, instead of the calendar’s. |
recurrence | RecurrenceInput<TData> | Turns the event into a series. |
data | TData | Your payload. Carried through untouched and typed end to end. |
Events covers what these mean in practice — lengths, all-day boundaries and time zones.
Recurrence
Type
type RecurrenceInput<TData = unknown> = { rule?: string dates?: string[] exceptions?: string[] overrides?: RecurrenceOverride<TData>[] } type RecurrenceOverride<TData = unknown> = { recurrenceId: string cancelled?: boolean start?: string end?: string duration?: string data?: TData }
| Field | Type | Description |
|---|---|---|
rule | string | An RFC 5545 RRULE, with or without the prefix. |
dates | string[] | Extra starts the rule does not produce. |
exceptions | string[] | Instances to remove, by their start. Removed after COUNT is counted. |
overrides | RecurrenceOverride<TData>[] | One instance replaced — moved, resized, re-tagged — or dropped with cancelled. |
Recurrence has the supported rule parts and what an expanded instance looks like.