ChronousDocumentation

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
}
FieldTypeDescription
idstringYour own id. It comes back on every box and bar as data-event-id.
startstringAn 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.
endstringWins over duration. Exclusive for an all-day event.
durationstringAn ISO-8601 duration. Date units are calendar arithmetic, clock units are exact.
allDaybooleanForces a timed event into the all-day lanes.
timeZonestringThe zone this event is read in, instead of the calendar’s.
recurrenceRecurrenceInput<TData>Turns the event into a series.
dataTDataYour 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
}
FieldTypeDescription
rulestringAn RFC 5545 RRULE, with or without the prefix.
datesstring[]Extra starts the rule does not produce.
exceptionsstring[]Instances to remove, by their start. Removed after COUNT is counted.
overridesRecurrenceOverride<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.