Birch UI v0.1
Pricing

@birchui/calendar

Event Calendar: createCalendar, views, recurrence rules, iCal import and export, and the calendar API.

Open .md
npm install @birchui/calendarLicense: Commercial

Key exports: createCalendar, CalendarOptions, CalendarApi, CalendarEventMap, CalendarEvent, parseRRule, parseICS, toICS

Guides: Keyboard and accessibility, Event Calendar API and events, Event sources, iCalendar import and export, Drag, resize and select, Event Calendar overview

Functions#

createCalendarfunction#

function createCalendar<TEvent extends CalendarEvent = CalendarEvent>(container: HTMLElement, options: CalendarOptions<TEvent> = {}): CalendarApi<TEvent>
ParameterTypeDescription
containerHTMLElement—
optionsoptionalCalendarOptions<TEvent>—

Defined in packages/calendar/src/calendar.ts:868

expandRRulefunction#

function expandRRule(rule: RRule, dtstart: number, options: ExpandOptions = {}): number[]
ParameterTypeDescription
ruleRRule—
dtstartnumber—
optionsoptionalExpandOptions—

Defined in packages/calendar/src/engine/rrule.ts:400

formatRRulefunction#

function formatRRule(rule: RRule): string
ParameterTypeDescription
ruleRRule—

Defined in packages/calendar/src/engine/rrule.ts:190

parseICSfunction#

function parseICS(text: string, options: ParseIcsOptions = {}): IcsEvent[]
ParameterTypeDescription
textstring—
optionsoptionalParseIcsOptions—

Defined in packages/calendar/src/engine/ics.ts:335

parseRRulefunction#

function parseRRule(text: string): RRule
ParameterTypeDescription
textstring—

Defined in packages/calendar/src/engine/rrule.ts:156

toICSfunction#

function toICS(events: readonly CalendarEvent[], options: ToIcsOptions = {}): string
ParameterTypeDescription
eventsreadonly CalendarEvent[]—
optionsoptionalToIcsOptions—

Defined in packages/calendar/src/engine/ics.ts:487

Classes#

InputLimitErrorclass#

class InputLimitError extends Error
new InputLimitError(readonly code: InputLimitCode, readonly limit: number, readonly actual: number, message: string)
MemberTypeDescription
namereadonly"InputLimitError"—
codereadonlyInputLimitCode—
limitreadonlynumber—
actualreadonlynumber—

Defined in packages/core/src/input-limits.ts:4

RRuleErrorclass#

class RRuleError extends Error
new RRuleError(message: string)

Defined in packages/calendar/src/engine/rrule.ts:52

Constants#

CALENDAR_EVENTSconst#

const CALENDAR_EVENTS: readonly ["ready", "eventClick", "eventDoubleClick", "eventDrop", "eventResize", "eventRemove", "select", "dateClick", "viewChange", "rangeChange", "moreClick", "loading"]

Defined in packages/calendar/src/calendar.ts:878

calendarDefinitionconst#

const calendarDefinition: WidgetDefinition<CalendarOptions<CalendarEvent>, CalendarEventMap<CalendarEvent>, CalendarApi<CalendarEvent>>

Defined in packages/calendar/src/calendar.ts:893

calendarStylesconst#

const calendarStyles: "\n.lq-theme-dark {\n --lq-fg: #e6edf3;\n --lq-bg: #0d1117;\n --lq-muted-fg: #9198a1;\n --lq-border: #30363d;\n --lq-header-bg: #161b22;\n --lq-header-fg: #e6edf3;\n --lq-row-alt: #11161d;\n --lq-row-hover: #1c2128;\n --lq-accent: #4493f8;\n --lq-accent-fg: #0d1117;\n --lq-selection-bg: rgba(68, 147, 248, 0.18);\n --lq-range-bg: rgba(68, 147, 248, 0.2);\n --lq-focus-ring: #4493f8;\n --lq-cal-now: #ff6b6b;\n --lq-cal-nonbusiness: rgba(255, 255, 255, 0.035);\n --lq-cal-today-bg: rgba(68, 147, 248, 0.08);\n --lq-cal-slot-line-color: rgba(255, 255, 255, 0.05);\n --lq-cal-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);\n color-scheme: dark;\n}\n\n.lq-cal {\n --lq-cal-fg: var(--lq-fg, #1f2328);\n --lq-cal-bg: var(--lq-bg, #ffffff);\n --lq-cal-muted: var(--lq-muted-fg, #656d76);\n --lq-cal-border: var(--lq-border, #d8dee4);\n --lq-cal-header-bg: var(--lq-header-bg, #f6f8fa);\n --lq-cal-hover: var(--lq-row-hover, #f0f4f8);\n --lq-cal-accent: var(--lq-accent, #2563eb);\n --lq-cal-accent-fg: var(--lq-accent-fg, #ffffff);\n --lq-cal-selection: var(--lq-selection-bg, rgba(37, 99, 235, 0.12));\n --lq-cal-focus: var(--lq-focus-ring, #2563eb);\n --lq-cal-radius: var(--lq-radius, 6px);\n --lq-cal-lane-h: 22px;\n --lq-cal-gutter: 56px;\n --lq-cal-hour-line: var(--lq-cal-border);\n --lq-cal-slot-line: var(--lq-cal-slot-line-color, rgba(31, 35, 40, 0.06));\n --lq-cal-now-color: var(--lq-cal-now, #d1242f);\n --lq-cal-nonbusiness-bg: var(--lq-cal-nonbusiness, rgba(31, 35, 40, 0.04));\n --lq-cal-today: var(--lq-cal-today-bg, rgba(37, 99, 235, 0.05));\n --lq-cal-popover-shadow: var(--lq-cal-shadow, 0 8px 24px rgba(31, 35, 40, 0.18));\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n box-sizing: border-box;\n font-family: var(--lq-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif);\n font-size: var(--lq-font-size, 13px);\n line-height: 1.4;\n color: var(--lq-cal-fg);\n background: var(--lq-cal-bg);\n border: 1px solid var(--lq-cal-border);\n border-radius: var(--lq-cal-radius);\n overflow: hidden;\n}\n\n.lq-cal *,\n.lq-cal *::before,\n.lq-cal *::after {\n box-sizing: border-box;\n}\n\n.lq-cal-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.lq-cal-view {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n}\n\n.lq-cal--dragging {\n user-select: none;\n touch-action: none;\n}\n\n.lq-cal--dragging .lq-cal-event {\n cursor: grabbing;\n}\n\n.lq-cal-toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: 8px 12px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-toolbar-section {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.lq-cal-title-wrap {\n display: flex;\n align-items: center;\n gap: 8px;\n}\n\n.lq-cal-title {\n margin: 0;\n font-size: 1.3em;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n\n.lq-cal-btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n height: 32px;\n min-width: 32px;\n padding: 0 12px;\n font: inherit;\n font-weight: 500;\n color: var(--lq-cal-fg);\n background: var(--lq-cal-bg);\n border: 1px solid var(--lq-cal-border);\n border-radius: var(--lq-cal-radius);\n cursor: pointer;\n}\n\n.lq-cal-btn--icon {\n padding: 0;\n}\n\n.lq-cal-btn:hover:not(:disabled) {\n background: var(--lq-cal-hover);\n}\n\n.lq-cal-btn:focus-visible,\n.lq-cal-popover-close:focus-visible {\n outline: 2px solid var(--lq-cal-focus);\n outline-offset: 2px;\n position: relative;\n z-index: 1;\n}\n\n.lq-cal-btn:disabled {\n opacity: 0.55;\n cursor: default;\n}\n\n.lq-cal-btn--active {\n color: var(--lq-cal-accent-fg);\n background: var(--lq-cal-accent);\n border-color: var(--lq-cal-accent);\n}\n\n.lq-cal-btn--active:hover:not(:disabled) {\n background: var(--lq-cal-accent);\n}\n\n.lq-cal-btn-group {\n display: inline-flex;\n}\n\n.lq-cal-btn-group > .lq-cal-btn:not(:first-child) {\n margin-inline-start: -1px;\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.lq-cal-btn-group > .lq-cal-btn:not(:last-child) {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.lq-cal-loading--active {\n width: 14px;\n height: 14px;\n overflow: hidden;\n color: transparent;\n border: 2px solid var(--lq-cal-border);\n border-top-color: var(--lq-cal-accent);\n border-radius: 50%;\n}\n\n.lq-cal-month {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n}\n\n.lq-cal-month-head,\n.lq-cal-week {\n display: grid;\n grid-template-columns: repeat(var(--lq-cal-cols, 7), minmax(0, 1fr));\n}\n\n.lq-cal-month-head {\n border-bottom: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-colhead {\n padding: 6px 8px;\n font-size: 0.85em;\n font-weight: 600;\n text-align: center;\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-month-body {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n}\n\n.lq-cal-week {\n flex: 1 0 auto;\n min-height: calc(36px + var(--lq-cal-lanes, 1) * var(--lq-cal-lane-h));\n border-bottom: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-week:last-child {\n border-bottom: 0;\n}\n\n.lq-cal-day {\n position: relative;\n display: flex;\n flex-direction: column;\n min-width: 0;\n padding-bottom: 4px;\n border-inline-start: 1px solid var(--lq-cal-border);\n outline: none;\n}\n\n.lq-cal-day:first-child {\n border-inline-start: 0;\n}\n\n.lq-cal-day--other-month {\n color: var(--lq-cal-muted);\n background: var(--lq-cal-header-bg);\n}\n\n.lq-cal-day--selected,\n.lq-cal-tg-allday-cell--selected {\n background: var(--lq-cal-selection);\n}\n\n.lq-cal-day:focus-visible,\n.lq-cal-tg-colhead:focus-visible,\n.lq-cal-mini-day:focus-visible {\n box-shadow: inset 0 0 0 2px var(--lq-cal-focus);\n}\n\n.lq-cal-tg-scroller:focus-visible {\n outline: 2px solid var(--lq-cal-focus);\n outline-offset: -2px;\n}\n\n.lq-cal-day-head {\n display: flex;\n justify-content: flex-end;\n height: 30px;\n padding: 4px 6px 2px;\n}\n\n.lq-cal-daynum {\n min-width: 24px;\n height: 24px;\n padding: 0 4px;\n font-size: 0.92em;\n line-height: 24px;\n text-align: center;\n border-radius: 999px;\n}\n\n.lq-cal-daynum[data-nav-link] {\n cursor: pointer;\n}\n\n.lq-cal-daynum[data-nav-link]:hover {\n text-decoration: underline;\n}\n\n.lq-cal-day--today .lq-cal-daynum,\n.lq-cal-tg-colhead--today .lq-cal-daynum,\n.lq-cal-mini-day--today .lq-cal-mini-num {\n font-weight: 600;\n color: var(--lq-cal-accent-fg);\n background: var(--lq-cal-accent);\n}\n\n.lq-cal-day-events {\n position: relative;\n height: calc(var(--lq-cal-lanes, 1) * var(--lq-cal-lane-h));\n}\n\n.lq-cal-day-events > .lq-cal-event,\n.lq-cal-day-events > .lq-cal-more {\n position: absolute;\n top: calc(var(--lq-cal-lane, 0) * var(--lq-cal-lane-h));\n inset-inline-start: 2px;\n z-index: 1;\n width: calc(var(--lq-cal-span, 1) * 100% + (var(--lq-cal-span, 1) - 1) * 1px - 4px);\n height: calc(var(--lq-cal-lane-h) - 2px);\n}\n\n.lq-cal-event {\n --lq-cal-event-bg: var(--lq-cal-event-color, var(--lq-cal-accent));\n --lq-cal-event-fg: var(--lq-cal-event-text, var(--lq-cal-accent-fg));\n position: relative;\n display: flex;\n align-items: center;\n gap: 4px;\n min-width: 0;\n overflow: hidden;\n font-size: 0.88em;\n line-height: 1.3;\n white-space: nowrap;\n color: var(--lq-cal-fg);\n border-radius: 4px;\n cursor: pointer;\n user-select: none;\n touch-action: manipulation;\n -webkit-touch-callout: none;\n}\n\n.lq-cal-event--editable {\n cursor: grab;\n}\n\n.lq-cal-event:focus-visible,\n.lq-cal-more:focus-visible {\n z-index: 3;\n outline: 2px solid var(--lq-cal-focus);\n outline-offset: 1px;\n}\n\n.lq-cal-event-time {\n flex: none;\n font-variant-numeric: tabular-nums;\n}\n\n.lq-cal-event-title,\n.lq-cal-event-content {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 500;\n}\n\n.lq-cal-event--bar {\n padding: 0 6px;\n color: var(--lq-cal-event-fg);\n background: var(--lq-cal-event-bg);\n}\n\n.lq-cal-event--dot {\n padding: 0 6px;\n}\n\n.lq-cal-event--dot::before {\n content: \"\";\n flex: none;\n width: 8px;\n height: 8px;\n background: var(--lq-cal-event-bg);\n border-radius: 50%;\n}\n\n.lq-cal-event--dot .lq-cal-event-time {\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-event--dot:hover,\n.lq-cal-more:hover {\n background: var(--lq-cal-hover);\n}\n\n.lq-cal-event--continues-before {\n border-start-start-radius: 0;\n border-end-start-radius: 0;\n}\n\n.lq-cal-event--continues-after {\n border-start-end-radius: 0;\n border-end-end-radius: 0;\n}\n\n.lq-cal-event--ghost {\n opacity: 0.4;\n}\n\n.lq-cal-event--mirror {\n z-index: 4;\n pointer-events: none;\n opacity: 0.92;\n box-shadow: 0 4px 12px rgba(31, 35, 40, 0.25);\n}\n\n.lq-cal-event--invalid {\n cursor: not-allowed;\n outline: 2px dashed var(--lq-cal-now-color);\n outline-offset: -2px;\n opacity: 0.7;\n}\n\n.lq-cal-resizer {\n position: absolute;\n z-index: 2;\n}\n\n.lq-cal-event--bar .lq-cal-resizer--end {\n top: 0;\n inset-inline-end: 0;\n bottom: 0;\n width: 8px;\n cursor: ew-resize;\n}\n\n.lq-cal-event--block .lq-cal-resizer {\n inset-inline-start: 0;\n inset-inline-end: 0;\n height: 8px;\n cursor: ns-resize;\n}\n\n.lq-cal-event--block .lq-cal-resizer--start {\n top: 0;\n}\n\n.lq-cal-event--block .lq-cal-resizer--end {\n bottom: 0;\n}\n\n.lq-cal-more {\n display: flex;\n align-items: center;\n padding: 0 6px;\n font-size: 0.82em;\n font-weight: 600;\n color: var(--lq-cal-fg);\n border-radius: 4px;\n cursor: pointer;\n}\n\n.lq-cal-timegrid {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n}\n\n.lq-cal-tg-head,\n.lq-cal-tg-allday,\n.lq-cal-tg-body {\n display: grid;\n grid-template-columns: var(--lq-cal-gutter) minmax(0, 1fr);\n}\n\n.lq-cal-tg-head {\n grid-template-columns: var(--lq-cal-gutter) repeat(var(--lq-cal-cols, 7), minmax(0, 1fr));\n border-bottom: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-tg-colhead {\n display: flex;\n flex-direction: column;\n align-items: center;\n gap: 2px;\n padding: 6px 4px;\n border-inline-start: 1px solid var(--lq-cal-border);\n outline: none;\n}\n\n.lq-cal-tg-weekday {\n font-size: 0.78em;\n font-weight: 600;\n letter-spacing: 0.04em;\n text-transform: uppercase;\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-tg-colhead .lq-cal-daynum {\n min-width: 32px;\n height: 32px;\n font-size: 1.3em;\n line-height: 32px;\n}\n\n.lq-cal-tg-allday {\n border-bottom: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-tg-allday-label {\n align-self: center;\n padding: 4px 6px;\n font-size: 0.75em;\n text-align: end;\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-tg-allday-cols {\n display: grid;\n grid-template-columns: repeat(var(--lq-cal-cols, 7), minmax(0, 1fr));\n}\n\n.lq-cal-tg-allday-cell {\n position: relative;\n padding: 2px 0;\n border-inline-start: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-tg-allday-cell--today,\n.lq-cal-tg-col--today {\n background-color: var(--lq-cal-today);\n}\n\n.lq-cal-tg-scroller {\n position: relative;\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n\n.lq-cal--auto-height .lq-cal-tg-scroller {\n flex: none;\n overflow: visible;\n}\n\n.lq-cal-tg-body {\n position: relative;\n height: var(--lq-cal-body-h);\n}\n\n.lq-cal-tg-axis {\n position: relative;\n}\n\n.lq-cal-tg-label {\n position: absolute;\n inset-inline-end: 8px;\n font-size: 0.75em;\n white-space: nowrap;\n color: var(--lq-cal-muted);\n transform: translateY(-50%);\n}\n\n.lq-cal-tg-label:first-child {\n transform: none;\n}\n\n.lq-cal-tg-cols {\n position: relative;\n display: grid;\n grid-template-columns: repeat(var(--lq-cal-cols, 7), minmax(0, 1fr));\n background-image:\n linear-gradient(to bottom, var(--lq-cal-hour-line) 1px, transparent 1px),\n linear-gradient(to bottom, var(--lq-cal-slot-line) 1px, transparent 1px);\n background-size:\n 100% var(--lq-cal-hour-h),\n 100% var(--lq-cal-slot-h);\n}\n\n.lq-cal-tg-col {\n position: relative;\n border-inline-start: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-tg-nonbusiness {\n position: absolute;\n inset-inline-start: 0;\n inset-inline-end: 0;\n background: var(--lq-cal-nonbusiness-bg);\n pointer-events: none;\n}\n\n.lq-cal-event--block {\n position: absolute;\n z-index: 1;\n flex-direction: column;\n align-items: stretch;\n gap: 0;\n padding: 2px 6px;\n white-space: normal;\n color: var(--lq-cal-event-fg);\n background: var(--lq-cal-event-bg);\n border: 1px solid var(--lq-cal-bg);\n}\n\n.lq-cal-event--block .lq-cal-event-time {\n font-size: 0.92em;\n}\n\n.lq-cal-event--short {\n flex-direction: row;\n align-items: center;\n gap: 6px;\n white-space: nowrap;\n}\n\n.lq-cal-event--short .lq-cal-event-time {\n order: 2;\n}\n\n.lq-cal-selection {\n position: absolute;\n inset-inline-start: 2px;\n inset-inline-end: 2px;\n z-index: 2;\n background: var(--lq-cal-selection);\n border: 1px solid var(--lq-cal-accent);\n border-radius: 4px;\n pointer-events: none;\n}\n\n.lq-cal-now {\n position: absolute;\n inset-inline-start: 0;\n inset-inline-end: 0;\n z-index: 5;\n height: 0;\n border-top: 2px solid var(--lq-cal-now-color);\n pointer-events: none;\n}\n\n.lq-cal-now::before {\n content: \"\";\n position: absolute;\n top: -6px;\n inset-inline-start: -5px;\n width: 10px;\n height: 10px;\n background: var(--lq-cal-now-color);\n border-radius: 50%;\n}\n\n.lq-cal-agenda {\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n min-height: 0;\n}\n\n.lq-cal-agenda-scroller {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n}\n\n.lq-cal--auto-height .lq-cal-agenda-scroller {\n max-height: 600px;\n}\n\n.lq-cal-agenda-spacer {\n position: relative;\n}\n\n.lq-cal-agenda-day,\n.lq-cal-agenda-row {\n position: absolute;\n inset-inline-start: 0;\n inset-inline-end: 0;\n}\n\n.lq-cal-agenda-day {\n display: flex;\n align-items: center;\n justify-content: space-between;\n height: 36px;\n padding: 0 12px;\n font-weight: 600;\n background: var(--lq-cal-header-bg);\n border-bottom: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-agenda-day-date {\n font-weight: 400;\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-agenda-row {\n height: 48px;\n border-bottom: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-event--list {\n height: 100%;\n gap: 12px;\n padding: 0 12px;\n font-size: 1em;\n border-radius: 0;\n}\n\n.lq-cal-event--list:hover {\n background: var(--lq-cal-hover);\n}\n\n.lq-cal-event--list:focus-visible {\n outline-offset: -2px;\n}\n\n.lq-cal-agenda-time {\n flex: none;\n width: 9.5em;\n font-variant-numeric: tabular-nums;\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-agenda-dot {\n flex: none;\n width: 10px;\n height: 10px;\n background: var(--lq-cal-event-bg);\n border-radius: 50%;\n}\n\n.lq-cal-agenda-empty {\n padding: 40px 16px;\n text-align: center;\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-year {\n display: grid;\n flex: 1 1 auto;\n grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));\n gap: 20px 28px;\n min-height: 0;\n padding: 16px;\n overflow-y: auto;\n}\n\n.lq-cal-mini-title {\n margin-bottom: 6px;\n font-weight: 600;\n cursor: pointer;\n}\n\n.lq-cal-mini-title:hover {\n text-decoration: underline;\n}\n\n.lq-cal-mini-row {\n display: grid;\n grid-template-columns: repeat(var(--lq-cal-cols, 7), minmax(0, 1fr));\n}\n\n.lq-cal-mini-colhead {\n padding: 2px 0;\n font-size: 0.72em;\n text-align: center;\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-mini-day {\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n gap: 1px;\n height: 32px;\n font-size: 0.82em;\n border-radius: 6px;\n cursor: pointer;\n outline: none;\n}\n\n.lq-cal-mini-day:hover:not(.lq-cal-mini-day--empty) {\n background: var(--lq-cal-hover);\n}\n\n.lq-cal-mini-day--empty {\n cursor: default;\n}\n\n.lq-cal-mini-day--past:not(.lq-cal-mini-day--busy) {\n color: var(--lq-cal-muted);\n}\n\n.lq-cal-mini-day--busy .lq-cal-mini-num {\n font-weight: 600;\n}\n\n.lq-cal-mini-num {\n min-width: 22px;\n padding: 0 3px;\n line-height: 20px;\n text-align: center;\n border-radius: 999px;\n}\n\n.lq-cal-mini-dots {\n display: flex;\n gap: 2px;\n height: 4px;\n}\n\n.lq-cal-mini-dot {\n width: 4px;\n height: 4px;\n background: var(--lq-cal-accent);\n border-radius: 50%;\n}\n\n.lq-cal-popover {\n position: absolute;\n z-index: 20;\n width: 260px;\n max-height: 340px;\n overflow: auto;\n background: var(--lq-cal-bg);\n border: 1px solid var(--lq-cal-border);\n border-radius: 8px;\n box-shadow: var(--lq-cal-popover-shadow);\n}\n\n.lq-cal-popover-head {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 8px 8px 12px;\n border-bottom: 1px solid var(--lq-cal-border);\n}\n\n.lq-cal-popover-title {\n margin: 0;\n font-size: 0.95em;\n font-weight: 600;\n}\n\n.lq-cal-popover-close {\n width: 28px;\n height: 28px;\n font: inherit;\n font-size: 1.3em;\n line-height: 1;\n color: var(--lq-cal-muted);\n background: transparent;\n border: 0;\n border-radius: 4px;\n cursor: pointer;\n}\n\n.lq-cal-popover-close:hover {\n background: var(--lq-cal-hover);\n}\n\n.lq-cal-popover-body {\n display: flex;\n flex-direction: column;\n gap: 2px;\n padding: 6px;\n}\n\n.lq-cal-popover-body > .lq-cal-event {\n height: 26px;\n}\n\n@media (prefers-reduced-motion: no-preference) {\n .lq-cal-btn,\n .lq-cal-event,\n .lq-cal-mini-day {\n transition: background-color 120ms ease, opacity 120ms ease;\n }\n\n .lq-cal-loading--active {\n animation: lq-cal-spin 0.8s linear infinite;\n }\n}\n\n@keyframes lq-cal-spin {\n to {\n transform: rotate(360deg);\n }\n}\n\n@media (forced-colors: active) {\n .lq-cal-event--bar,\n .lq-cal-event--block {\n border: 1px solid CanvasText;\n }\n\n .lq-cal-day--today .lq-cal-daynum,\n .lq-cal-tg-colhead--today .lq-cal-daynum,\n .lq-cal-mini-day--today .lq-cal-mini-num {\n outline: 2px solid Highlight;\n }\n\n .lq-cal-now,\n .lq-cal-now::before {\n border-color: Highlight;\n background: Highlight;\n }\n\n .lq-cal-day:focus-visible,\n .lq-cal-tg-colhead:focus-visible,\n .lq-cal-mini-day:focus-visible,\n .lq-cal-tg-scroller:focus-visible,\n .lq-cal :focus-visible {\n outline: 2px solid Highlight;\n outline-offset: -2px;\n }\n\n .lq-cal-day--selected,\n .lq-cal-tg-allday-cell--selected {\n outline: 2px dashed Highlight;\n outline-offset: -3px;\n }\n}\n\n@media (max-width: 640px) {\n .lq-cal {\n --lq-cal-gutter: 44px;\n }\n\n .lq-cal-toolbar {\n justify-content: center;\n }\n\n .lq-cal-agenda-time {\n width: 7.5em;\n }\n}\n" = ` .lq-theme-dark { --lq-fg: #e6edf3; --lq-bg: #0d1117; --lq-muted-fg: #9198a1; --lq-border: #30363d; --lq-header-bg: #161b22; --lq-header-fg: #e6edf3; --lq-row-alt: #11161d; --lq-row-hover: #1c2128; --lq-accent: #4493f8; --lq-accent-fg: #0d1117; --lq-selection-bg: rgba(68, 147, 248, 0.18); --lq-range-bg: rgba(68, 147, 248, 0.2); --lq-focus-ring: #4493f8; --lq-cal-now: #ff6b6b; --lq-cal-nonbusiness: rgba(255, 255, 255, 0.035); --lq-cal-today-bg: rgba(68, 147, 248, 0.08); --lq-cal-slot-line-color: rgba(255, 255, 255, 0.05); --lq-cal-shadow: 0 8px 24px rgba(0, 0, 0, 0.5); color-scheme: dark; } .lq-cal { --lq-cal-fg: var(--lq-fg, #1f2328); --lq-cal-bg: var(--lq-bg, #ffffff); --lq-cal-muted: var(--lq-muted-fg, #656d76); --lq-cal-border: var(--lq-border, #d8dee4); --lq-cal-header-bg: var(--lq-header-bg, #f6f8fa); --lq-cal-hover: var(--lq-row-hover, #f0f4f8); --lq-cal-accent: var(--lq-accent, #2563eb); --lq-cal-accent-fg: var(--lq-accent-fg, #ffffff); --lq-cal-selection: var(--lq-selection-bg, rgba(37, 99, 235, 0.12)); --lq-cal-focus: var(--lq-focus-ring, #2563eb); --lq-cal-radius: var(--lq-radius, 6px); --lq-cal-lane-h: 22px; --lq-cal-gutter: 56px; --lq-cal-hour-line: var(--lq-cal-border); --lq-cal-slot-line: var(--lq-cal-slot-line-color, rgba(31, 35, 40, 0.06)); --lq-cal-now-color: var(--lq-cal-now, #d1242f); --lq-cal-nonbusiness-bg: var(--lq-cal-nonbusiness, rgba(31, 35, 40, 0.04)); --lq-cal-today: var(--lq-cal-today-bg, rgba(37, 99, 235, 0.05)); --lq-cal-popover-shadow: var(--lq-cal-shadow, 0 8px 24px rgba(31, 35, 40, 0.18)); position: relative; display: flex; flex-direction: column; min-width: 0; box-sizing: border-box; font-family: var(--lq-font-family, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif); font-size: var(--lq-font-size, 13px); line-height: 1.4; color: var(--lq-cal-fg); background: var(--lq-cal-bg); border: 1px solid var(--lq-cal-border); border-radius: var(--lq-cal-radius); overflow: hidden; } .lq-cal *, .lq-cal *::before, .lq-cal *::after { box-sizing: border-box; } .lq-cal-sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } .lq-cal-view { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; } .lq-cal--dragging { user-select: none; touch-action: none; } .lq-cal--dragging .lq-cal-event { cursor: grabbing; } .lq-cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px; border-bottom: 1px solid var(--lq-cal-border); } .lq-cal-toolbar-section { display: flex; align-items: center; gap: 8px; } .lq-cal-title-wrap { display: flex; align-items: center; gap: 8px; } .lq-cal-title { margin: 0; font-size: 1.3em; font-weight: 600; letter-spacing: -0.01em; } .lq-cal-btn { display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 32px; padding: 0 12px; font: inherit; font-weight: 500; color: var(--lq-cal-fg); background: var(--lq-cal-bg); border: 1px solid var(--lq-cal-border); border-radius: var(--lq-cal-radius); cursor: pointer; } .lq-cal-btn--icon { padding: 0; } .lq-cal-btn:hover:not(:disabled) { background: var(--lq-cal-hover); } .lq-cal-btn:focus-visible, .lq-cal-popover-close:focus-visible { outline: 2px solid var(--lq-cal-focus); outline-offset: 2px; position: relative; z-index: 1; } .lq-cal-btn:disabled { opacity: 0.55; cursor: default; } .lq-cal-btn--active { color: var(--lq-cal-accent-fg); background: var(--lq-cal-accent); border-color: var(--lq-cal-accent); } .lq-cal-btn--active:hover:not(:disabled) { background: var(--lq-cal-accent); } .lq-cal-btn-group { display: inline-flex; } .lq-cal-btn-group > .lq-cal-btn:not(:first-child) { margin-inline-start: -1px; border-start-start-radius: 0; border-end-start-radius: 0; } .lq-cal-btn-group > .lq-cal-btn:not(:last-child) { border-start-end-radius: 0; border-end-end-radius: 0; } .lq-cal-loading--active { width: 14px; height: 14px; overflow: hidden; color: transparent; border: 2px solid var(--lq-cal-border); border-top-color: var(--lq-cal-accent); border-radius: 50%; } .lq-cal-month { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; } .lq-cal-month-head, .lq-cal-week { display: grid; grid-template-columns: repeat(var(--lq-cal-cols, 7), minmax(0, 1fr)); } .lq-cal-month-head { border-bottom: 1px solid var(--lq-cal-border); } .lq-cal-colhead { padding: 6px 8px; font-size: 0.85em; font-weight: 600; text-align: center; color: var(--lq-cal-muted); } .lq-cal-month-body { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; } .lq-cal-week { flex: 1 0 auto; min-height: calc(36px + var(--lq-cal-lanes, 1) * var(--lq-cal-lane-h)); border-bottom: 1px solid var(--lq-cal-border); } .lq-cal-week:last-child { border-bottom: 0; } .lq-cal-day { position: relative; display: flex; flex-direction: column; min-width: 0; padding-bottom: 4px; border-inline-start: 1px solid var(--lq-cal-border); outline: none; } .lq-cal-day:first-child { border-inline-start: 0; } .lq-cal-day--other-month { color: var(--lq-cal-muted); background: var(--lq-cal-header-bg); } .lq-cal-day--selected, .lq-cal-tg-allday-cell--selected { background: var(--lq-cal-selection); } .lq-cal-day:focus-visible, .lq-cal-tg-colhead:focus-visible, .lq-cal-mini-day:focus-visible { box-shadow: inset 0 0 0 2px var(--lq-cal-focus); } .lq-cal-tg-scroller:focus-visible { outline: 2px solid var(--lq-cal-focus); outline-offset: -2px; } .lq-cal-day-head { display: flex; justify-content: flex-end; height: 30px; padding: 4px 6px 2px; } .lq-cal-daynum { min-width: 24px; height: 24px; padding: 0 4px; font-size: 0.92em; line-height: 24px; text-align: center; border-radius: 999px; } .lq-cal-daynum[data-nav-link] { cursor: pointer; } .lq-cal-daynum[data-nav-link]:hover { text-decoration: underline; } .lq-cal-day--today .lq-cal-daynum, .lq-cal-tg-colhead--today .lq-cal-daynum, .lq-cal-mini-day--today .lq-cal-mini-num { font-weight: 600; color: var(--lq-cal-accent-fg); background: var(--lq-cal-accent); } .lq-cal-day-events { position: relative; height: calc(var(--lq-cal-lanes, 1) * var(--lq-cal-lane-h)); } .lq-cal-day-events > .lq-cal-event, .lq-cal-day-events > .lq-cal-more { position: absolute; top: calc(var(--lq-cal-lane, 0) * var(--lq-cal-lane-h)); inset-inline-start: 2px; z-index: 1; width: calc(var(--lq-cal-span, 1) * 100% + (var(--lq-cal-span, 1) - 1) * 1px - 4px); height: calc(var(--lq-cal-lane-h) - 2px); } .lq-cal-event { --lq-cal-event-bg: var(--lq-cal-event-color, var(--lq-cal-accent)); --lq-cal-event-fg: var(--lq-cal-event-text, var(--lq-cal-accent-fg)); position: relative; display: flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; font-size: 0.88em; line-height: 1.3; white-space: nowrap; color: var(--lq-cal-fg); border-radius: 4px; cursor: pointer; user-select: none; touch-action: manipulation; -webkit-touch-callout: none; } .lq-cal-event--editable { cursor: grab; } .lq-cal-event:focus-visible, .lq-cal-more:focus-visible { z-index: 3; outline: 2px solid var(--lq-cal-focus); outline-offset: 1px; } .lq-cal-event-time { flex: none; font-variant-numeric: tabular-nums; } .lq-cal-event-title, .lq-cal-event-content { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-weight: 500; } .lq-cal-event--bar { padding: 0 6px; color: var(--lq-cal-event-fg); background: var(--lq-cal-event-bg); } .lq-cal-event--dot { padding: 0 6px; } .lq-cal-event--dot::before { content: ""; flex: none; width: 8px; height: 8px; background: var(--lq-cal-event-bg); border-radius: 50%; } .lq-cal-event--dot .lq-cal-event-time { color: var(--lq-cal-muted); } .lq-cal-event--dot:hover, .lq-cal-more:hover { background: var(--lq-cal-hover); } .lq-cal-event--continues-before { border-start-start-radius: 0; border-end-start-radius: 0; } .lq-cal-event--continues-after { border-start-end-radius: 0; border-end-end-radius: 0; } .lq-cal-event--ghost { opacity: 0.4; } .lq-cal-event--mirror { z-index: 4; pointer-events: none; opacity: 0.92; box-shadow: 0 4px 12px rgba(31, 35, 40, 0.25); } .lq-cal-event--invalid { cursor: not-allowed; outline: 2px dashed var(--lq-cal-now-color); outline-offset: -2px; opacity: 0.7; } .lq-cal-resizer { position: absolute; z-index: 2; } .lq-cal-event--bar .lq-cal-resizer--end { top: 0; inset-inline-end: 0; bottom: 0; width: 8px; cursor: ew-resize; } .lq-cal-event--block .lq-cal-resizer { inset-inline-start: 0; inset-inline-end: 0; height: 8px; cursor: ns-resize; } .lq-cal-event--block .lq-cal-resizer--start { top: 0; } .lq-cal-event--block .lq-cal-resizer--end { bottom: 0; } .lq-cal-more { display: flex; align-items: center; padding: 0 6px; font-size: 0.82em; font-weight: 600; color: var(--lq-cal-fg); border-radius: 4px; cursor: pointer; } .lq-cal-timegrid { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; } .lq-cal-tg-head, .lq-cal-tg-allday, .lq-cal-tg-body { display: grid; grid-template-columns: var(--lq-cal-gutter) minmax(0, 1fr); } .lq-cal-tg-head { grid-template-columns: var(--lq-cal-gutter) repeat(var(--lq-cal-cols, 7), minmax(0, 1fr)); border-bottom: 1px solid var(--lq-cal-border); } .lq-cal-tg-colhead { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-inline-start: 1px solid var(--lq-cal-border); outline: none; } .lq-cal-tg-weekday { font-size: 0.78em; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--lq-cal-muted); } .lq-cal-tg-colhead .lq-cal-daynum { min-width: 32px; height: 32px; font-size: 1.3em; line-height: 32px; } .lq-cal-tg-allday { border-bottom: 1px solid var(--lq-cal-border); } .lq-cal-tg-allday-label { align-self: center; padding: 4px 6px; font-size: 0.75em; text-align: end; color: var(--lq-cal-muted); } .lq-cal-tg-allday-cols { display: grid; grid-template-columns: repeat(var(--lq-cal-cols, 7), minmax(0, 1fr)); } .lq-cal-tg-allday-cell { position: relative; padding: 2px 0; border-inline-start: 1px solid var(--lq-cal-border); } .lq-cal-tg-allday-cell--today, .lq-cal-tg-col--today { background-color: var(--lq-cal-today); } .lq-cal-tg-scroller { position: relative; flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; } .lq-cal--auto-height .lq-cal-tg-scroller { flex: none; overflow: visible; } .lq-cal-tg-body { position: relative; height: var(--lq-cal-body-h); } .lq-cal-tg-axis { position: relative; } .lq-cal-tg-label { position: absolute; inset-inline-end: 8px; font-size: 0.75em; white-space: nowrap; color: var(--lq-cal-muted); transform: translateY(-50%); } .lq-cal-tg-label:first-child { transform: none; } .lq-cal-tg-cols { position: relative; display: grid; grid-template-columns: repeat(var(--lq-cal-cols, 7), minmax(0, 1fr)); background-image: linear-gradient(to bottom, var(--lq-cal-hour-line) 1px, transparent 1px), linear-gradient(to bottom, var(--lq-cal-slot-line) 1px, transparent 1px); background-size: 100% var(--lq-cal-hour-h), 100% var(--lq-cal-slot-h); } .lq-cal-tg-col { position: relative; border-inline-start: 1px solid var(--lq-cal-border); } .lq-cal-tg-nonbusiness { position: absolute; inset-inline-start: 0; inset-inline-end: 0; background: var(--lq-cal-nonbusiness-bg); pointer-events: none; } .lq-cal-event--block { position: absolute; z-index: 1; flex-direction: column; align-items: stretch; gap: 0; padding: 2px 6px; white-space: normal; color: var(--lq-cal-event-fg); background: var(--lq-cal-event-bg); border: 1px solid var(--lq-cal-bg); } .lq-cal-event--block .lq-cal-event-time { font-size: 0.92em; } .lq-cal-event--short { flex-direction: row; align-items: center; gap: 6px; white-space: nowrap; } .lq-cal-event--short .lq-cal-event-time { order: 2; } .lq-cal-selection { position: absolute; inset-inline-start: 2px; inset-inline-end: 2px; z-index: 2; background: var(--lq-cal-selection); border: 1px solid var(--lq-cal-accent); border-radius: 4px; pointer-events: none; } .lq-cal-now { position: absolute; inset-inline-start: 0; inset-inline-end: 0; z-index: 5; height: 0; border-top: 2px solid var(--lq-cal-now-color); pointer-events: none; } .lq-cal-now::before { content: ""; position: absolute; top: -6px; inset-inline-start: -5px; width: 10px; height: 10px; background: var(--lq-cal-now-color); border-radius: 50%; } .lq-cal-agenda { display: flex; flex: 1 1 auto; flex-direction: column; min-height: 0; } .lq-cal-agenda-scroller { flex: 1 1 auto; min-height: 0; overflow-y: auto; } .lq-cal--auto-height .lq-cal-agenda-scroller { max-height: 600px; } .lq-cal-agenda-spacer { position: relative; } .lq-cal-agenda-day, .lq-cal-agenda-row { position: absolute; inset-inline-start: 0; inset-inline-end: 0; } .lq-cal-agenda-day { display: flex; align-items: center; justify-content: space-between; height: 36px; padding: 0 12px; font-weight: 600; background: var(--lq-cal-header-bg); border-bottom: 1px solid var(--lq-cal-border); } .lq-cal-agenda-day-date { font-weight: 400; color: var(--lq-cal-muted); } .lq-cal-agenda-row { height: 48px; border-bottom: 1px solid var(--lq-cal-border); } .lq-cal-event--list { height: 100%; gap: 12px; padding: 0 12px; font-size: 1em; border-radius: 0; } .lq-cal-event--list:hover { background: var(--lq-cal-hover); } .lq-cal-event--list:focus-visible { outline-offset: -2px; } .lq-cal-agenda-time { flex: none; width: 9.5em; font-variant-numeric: tabular-nums; color: var(--lq-cal-muted); } .lq-cal-agenda-dot { flex: none; width: 10px; height: 10px; background: var(--lq-cal-event-bg); border-radius: 50%; } .lq-cal-agenda-empty { padding: 40px 16px; text-align: center; color: var(--lq-cal-muted); } .lq-cal-year { display: grid; flex: 1 1 auto; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px 28px; min-height: 0; padding: 16px; overflow-y: auto; } .lq-cal-mini-title { margin-bottom: 6px; font-weight: 600; cursor: pointer; } .lq-cal-mini-title:hover { text-decoration: underline; } .lq-cal-mini-row { display: grid; grid-template-columns: repeat(var(--lq-cal-cols, 7), minmax(0, 1fr)); } .lq-cal-mini-colhead { padding: 2px 0; font-size: 0.72em; text-align: center; color: var(--lq-cal-muted); } .lq-cal-mini-day { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; height: 32px; font-size: 0.82em; border-radius: 6px; cursor: pointer; outline: none; } .lq-cal-mini-day:hover:not(.lq-cal-mini-day--empty) { background: var(--lq-cal-hover); } .lq-cal-mini-day--empty { cursor: default; } .lq-cal-mini-day--past:not(.lq-cal-mini-day--busy) { color: var(--lq-cal-muted); } .lq-cal-mini-day--busy .lq-cal-mini-num { font-weight: 600; } .lq-cal-mini-num { min-width: 22px; padding: 0 3px; line-height: 20px; text-align: center; border-radius: 999px; } .lq-cal-mini-dots { display: flex; gap: 2px; height: 4px; } .lq-cal-mini-dot { width: 4px; height: 4px; background: var(--lq-cal-accent); border-radius: 50%; } .lq-cal-popover { position: absolute; z-index: 20; width: 260px; max-height: 340px; overflow: auto; background: var(--lq-cal-bg); border: 1px solid var(--lq-cal-border); border-radius: 8px; box-shadow: var(--lq-cal-popover-shadow); } .lq-cal-popover-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 12px; border-bottom: 1px solid var(--lq-cal-border); } .lq-cal-popover-title { margin: 0; font-size: 0.95em; font-weight: 600; } .lq-cal-popover-close { width: 28px; height: 28px; font: inherit; font-size: 1.3em; line-height: 1; color: var(--lq-cal-muted); background: transparent; border: 0; border-radius: 4px; cursor: pointer; } .lq-cal-popover-close:hover { background: var(--lq-cal-hover); } .lq-cal-popover-body { display: flex; flex-direction: column; gap: 2px; padding: 6px; } .lq-cal-popover-body > .lq-cal-event { height: 26px; } @media (prefers-reduced-motion: no-preference) { .lq-cal-btn, .lq-cal-event, .lq-cal-mini-day { transition: background-color 120ms ease, opacity 120ms ease; } .lq-cal-loading--active { animation: lq-cal-spin 0.8s linear infinite; } } @keyframes lq-cal-spin { to { transform: rotate(360deg); } } @media (forced-colors: active) { .lq-cal-event--bar, .lq-cal-event--block { border: 1px solid CanvasText; } .lq-cal-day--today .lq-cal-daynum, .lq-cal-tg-colhead--today .lq-cal-daynum, .lq-cal-mini-day--today .lq-cal-mini-num { outline: 2px solid Highlight; } .lq-cal-now, .lq-cal-now::before { border-color: Highlight; background: Highlight; } .lq-cal-day:focus-visible, .lq-cal-tg-colhead:focus-visible, .lq-cal-mini-day:focus-visible, .lq-cal-tg-scroller:focus-visible, .lq-cal :focus-visible { outline: 2px solid Highlight; outline-offset: -2px; } .lq-cal-day--selected, .lq-cal-tg-allday-cell--selected { outline: 2px dashed Highlight; outline-offset: -3px; } } @media (max-width: 640px) { .lq-cal { --lq-cal-gutter: 44px; } .lq-cal-toolbar { justify-content: center; } .lq-cal-agenda-time { width: 7.5em; } } `

Defined in packages/calendar/src/styles.ts:1

DEFAULT_ICS_LIMITSconst#

const DEFAULT_ICS_LIMITS: Readonly<IcsLimits>

Defined in packages/calendar/src/engine/ics.ts:329

Interfaces#

BusinessHoursinterface#

interface BusinessHours
PropertyTypeDescription
daysOfWeekoptionalnumber[]—
startTimeoptionalstring—
endTimeoptionalstring—

Defined in packages/calendar/src/types.ts:51

CalendarApiinterface#

interface CalendarApi<TEvent extends CalendarEvent = CalendarEvent> extends Widget< CalendarOptions<TEvent>, CalendarEventMap<TEvent> >
MemberTypeDescription
setView()(view: ViewType, date?: DateInput) => void—
getView()() => ViewType—
gotoDate()(date: DateInput) => void—
getDate()() => Date—
today()() => void—
next()() => void—
prev()() => void—
getRange()() => DateRange—
getTitle()() => string—
setEvents()(events: TEvent[]) => void—
addEvent()(event: TEvent) => void—
updateEvent()(id: string | number, changes: Partial<TEvent>) => TEvent | undefined—
removeEvent()(id: string | number) => TEvent | undefined—
getEvent()(id: string | number) => TEvent | undefined—
getEvents()() => TEvent[]—
getOccurrences()(start: DateInput, end: DateInput) => EventOccurrence<TEvent>[]—
updateOccurrence()(occurrenceId: string, changes: OccurrenceChanges, scope?: EditScope) => TEvent | undefined—
removeOccurrence()(occurrenceId: string, scope?: EditScope) => void—
refetch()() => Promise<void>—
isLoading()() => boolean—
elementreadonlyHTMLElementInherited from Widget.
update()(options: Partial<CalendarOptions<TEvent>>) => voidInherited from Widget.
on()<K extends keyof TEvents & string>(event: K, listener: Listener<TEvents[K]>) => () => voidInherited from Widget.
destroy()() => voidInherited from Widget.

Defined in packages/calendar/src/types.ts:244

CalendarEventinterface#

interface CalendarEvent
[key: string]: unknown
PropertyTypeDescription
idstring | number—
titlestring—
startDateInput—
endoptionalDateInput—
allDayoptionalboolean—
coloroptionalstring—
rruleoptionalstring—
exdatesoptionalDateInput[]—
timeZoneoptionalstring—
editableoptionalboolean—

Defined in packages/calendar/src/types.ts:13

CalendarEventMapinterface#

interface CalendarEventMap<TEvent extends CalendarEvent = CalendarEvent>

Defined in packages/calendar/src/types.ts:223

CalendarLabelsinterface#

interface CalendarLabels
PropertyTypeDescription
todaystring—
previousstring—
nextstring—
allDaystring—
timeGridstring—
noEventsstring—
recurringstring—
closestring—
loadingstring—
viewSwitcherstring—
viewsRecord<ViewType, string>—
more(count: number) => string—
eventCount(count: number) => string—
eventRemoved(title: string) => string—

Defined in packages/calendar/src/types.ts:63

CalendarOptionsinterface#

interface CalendarOptions<TEvent extends CalendarEvent = CalendarEvent>
PropertyTypeDescription
eventsoptionalTEvent[]—
eventSourceoptional(request: EventSourceRequest) => Promise<TEvent[]>—
viewoptionalViewType—
viewsoptionalViewType[]—
dateoptionalDateInput—
firstDayoptionalnumber—
localeoptionalstring—
timeZoneoptionalstring—
hour12optionalboolean—
slotMinutesoptionalnumber—
snapMinutesoptionalnumber—
slotHeightoptionalnumber—
dayStartHouroptionalnumber—
dayEndHouroptionalnumber—
scrollToHouroptionalnumber—
businessHoursoptionalboolean | BusinessHours | BusinessHours[]—
weekendsoptionalboolean—
hiddenDaysoptionalnumber[]—
dayCountoptionalnumber—
agendaDaysoptionalnumber—
defaultTimedDurationoptionalnumber—
maxEventsPerDayoptionalnumber—
nowIndicatoroptionalboolean—
readOnlyoptionalboolean—
selectableoptionalboolean—
headerToolbaroptionalfalse | ToolbarOptions—
viewSwitcheroptionalboolean—
heightoptional'auto' | number—
themeoptionalThemeName—
injectStylesoptionalboolean—
licenseKeyoptionalstring—
labelsoptionalPartial<CalendarLabels>—
localeTextoptionalLocaleTextInput—
rtloptionalboolean—
nowoptional() => DateInput—
eventRendereroptional(occurrence: EventOccurrence<TEvent>, context: EventRenderContext) => RenderResult—
dayCellRendereroptional(context: DayCellContext) => RenderResult—
validateDropoptional(info: DropInfo<TEvent>) => boolean—
validateResizeoptional(info: ResizeInfo<TEvent>) => boolean—

Defined in packages/calendar/src/types.ts:111

DateClickPayloadinterface#

interface DateClickPayload
PropertyTypeDescription
dateDate—
allDayboolean—
viewViewType—
nativeEventEvent—

Defined in packages/calendar/src/types.ts:200

DateRangeinterface#

interface DateRange
PropertyTypeDescription
startDate—
endDate—

Defined in packages/calendar/src/types.ts:41

DayCellContextinterface#

interface DayCellContext
PropertyTypeDescription
dateDate—
dateKeystring—
viewViewType—
isTodayboolean—
isOtherMonthboolean—
eventCountnumber—

Defined in packages/calendar/src/types.ts:88

DropInfointerface#

interface DropInfo<TEvent extends CalendarEvent = CalendarEvent>
PropertyTypeDescription
eventTEvent—
occurrenceEventOccurrence<TEvent>—
startDate—
endDate—
allDayboolean—

Defined in packages/calendar/src/types.ts:99

EventChangePayloadinterface#

interface EventChangePayload<TEvent extends CalendarEvent = CalendarEvent>
PropertyTypeDescription
eventTEvent—
occurrenceEventOccurrence<TEvent>—
startDate—
endDate—
allDayboolean—
oldStartDate—
oldEndDate—
oldAllDayboolean—
isRecurringboolean—
scopeEditScope—
sourceInteractionSource—
revert()() => void—

Defined in packages/calendar/src/types.ts:161

EventDropPayloadinterface#

interface EventDropPayload<TEvent extends CalendarEvent = CalendarEvent> extends EventChangePayload<TEvent>
PropertyTypeDescription
deltanumber—
eventTEventInherited from EventChangePayload.
occurrenceEventOccurrence<TEvent>Inherited from EventChangePayload.
startDateInherited from EventChangePayload.
endDateInherited from EventChangePayload.
allDaybooleanInherited from EventChangePayload.
oldStartDateInherited from EventChangePayload.
oldEndDateInherited from EventChangePayload.
oldAllDaybooleanInherited from EventChangePayload.
isRecurringbooleanInherited from EventChangePayload.
scopeEditScopeInherited from EventChangePayload.
sourceInteractionSourceInherited from EventChangePayload.
revert()() => voidInherited from EventChangePayload.

Defined in packages/calendar/src/types.ts:176

EventOccurrenceinterface#

interface EventOccurrence<TEvent extends CalendarEvent = CalendarEvent>
PropertyTypeDescription
idstring—
occurrenceIdstring—
titlestring—
startDate—
endDate—
allDayboolean—
colorstring | undefined—
recurringboolean—
recurrenceIdstring | undefined—
editableboolean—
eventTEvent—

Defined in packages/calendar/src/types.ts:27

EventPointerPayloadinterface#

interface EventPointerPayload<TEvent extends CalendarEvent = CalendarEvent>
PropertyTypeDescription
eventTEvent—
occurrenceEventOccurrence<TEvent>—
elementHTMLElement—
nativeEventEvent—

Defined in packages/calendar/src/types.ts:154

EventRemovePayloadinterface#

interface EventRemovePayload<TEvent extends CalendarEvent = CalendarEvent>
PropertyTypeDescription
eventTEvent—
occurrenceEventOccurrence<TEvent>—
isRecurringboolean—
scopeEditScope—
sourceInteractionSource—
revert()() => void—

Defined in packages/calendar/src/types.ts:184

EventRenderContextinterface#

interface EventRenderContext
PropertyTypeDescription
viewViewType—
timeTextstring—
isStartboolean—
isEndboolean—
isMirrorboolean—

Defined in packages/calendar/src/types.ts:80

EventResizePayloadinterface#

interface EventResizePayload<TEvent extends CalendarEvent = CalendarEvent> extends EventChangePayload<TEvent>
PropertyTypeDescription
edge'start' | 'end'—
eventTEventInherited from EventChangePayload.
occurrenceEventOccurrence<TEvent>Inherited from EventChangePayload.
startDateInherited from EventChangePayload.
endDateInherited from EventChangePayload.
allDaybooleanInherited from EventChangePayload.
oldStartDateInherited from EventChangePayload.
oldEndDateInherited from EventChangePayload.
oldAllDaybooleanInherited from EventChangePayload.
isRecurringbooleanInherited from EventChangePayload.
scopeEditScopeInherited from EventChangePayload.
sourceInteractionSourceInherited from EventChangePayload.
revert()() => voidInherited from EventChangePayload.

Defined in packages/calendar/src/types.ts:180

EventSourceRequestinterface#

interface EventSourceRequest extends DateRange
PropertyTypeDescription
signalAbortSignal—
timeZonestring—
startDateInherited from DateRange.
endDateInherited from DateRange.

Defined in packages/calendar/src/types.ts:46

ExpandOptionsinterface#

interface ExpandOptions
PropertyTypeDescription
startoptionalnumber—
endoptionalnumber—
untilToWalloptional(instant: number) => number—
limitoptionalnumber—

Defined in packages/calendar/src/engine/rrule.ts:45

IcsEventinterface#

interface IcsEvent extends CalendarEvent
PropertyTypeDescription
descriptionoptionalstring—
locationoptionalstring—
urloptionalstring—
statusoptionalstring—
categoriesoptionalstring[]—
recurrenceIdoptionalstring—
recurringEventIdoptionalstring—
idstring | numberInherited from CalendarEvent.
titlestringInherited from CalendarEvent.
startDateInputInherited from CalendarEvent.
endoptionalDateInput | undefinedInherited from CalendarEvent.
allDayoptionalboolean | undefinedInherited from CalendarEvent.
coloroptionalstring | undefinedInherited from CalendarEvent.
rruleoptionalstring | undefinedInherited from CalendarEvent.
exdatesoptionalDateInput[] | undefinedInherited from CalendarEvent.
timeZoneoptionalstring | undefinedInherited from CalendarEvent.
editableoptionalboolean | undefinedInherited from CalendarEvent.

Defined in packages/calendar/src/engine/ics.ts:18

IcsLimitsinterface#

interface IcsLimits
PropertyTypeDescription
maxLengthnumber—
maxEventsnumber—

Defined in packages/calendar/src/engine/ics.ts:324

MoreClickPayloadinterface#

interface MoreClickPayload<TEvent extends CalendarEvent = CalendarEvent>
PropertyTypeDescription
dateDate—
occurrencesEventOccurrence<TEvent>[]—
hiddenCountnumber—
preventDefault()() => void—

Defined in packages/calendar/src/types.ts:207

OccurrenceChangesinterface#

interface OccurrenceChanges
PropertyTypeDescription
startoptionalDateInput—
endoptionalDateInput—
allDayoptionalboolean—

Defined in packages/calendar/src/types.ts:238

ParseIcsOptionsinterface#

interface ParseIcsOptions
PropertyTypeDescription
limitsoptionalPartial<IcsLimits>—

Defined in packages/calendar/src/engine/ics.ts:331

RangeChangePayloadinterface#

interface RangeChangePayload extends DateRange
PropertyTypeDescription
viewViewType—
startDateInherited from DateRange.
endDateInherited from DateRange.

Defined in packages/calendar/src/types.ts:219

ResizeInfointerface#

interface ResizeInfo<TEvent extends CalendarEvent = CalendarEvent> extends DropInfo<TEvent>
PropertyTypeDescription
edge'start' | 'end'—
eventTEventInherited from DropInfo.
occurrenceEventOccurrence<TEvent>Inherited from DropInfo.
startDateInherited from DropInfo.
endDateInherited from DropInfo.
allDaybooleanInherited from DropInfo.

Defined in packages/calendar/src/types.ts:107

RRuleinterface#

interface RRule
PropertyTypeDescription
freqFrequency—
intervalnumber—
countoptionalnumber—
untiloptionalRRuleUntil—
byDayoptionalWeekdaySpec[]—
byMonthDayoptionalnumber[]—
byMonthoptionalnumber[]—
bySetPosoptionalnumber[]—
byHouroptionalnumber[]—
byMinuteoptionalnumber[]—
bySecondoptionalnumber[]—
wkstnumber—
unsupportedoptionalstring[]—

Defined in packages/calendar/src/engine/rrule.ts:29

RRuleUntilinterface#

interface RRuleUntil
PropertyTypeDescription
valuenumber—
isUtcboolean—
isDateOnlyboolean—

Defined in packages/calendar/src/engine/rrule.ts:23

SelectPayloadinterface#

interface SelectPayload
PropertyTypeDescription
startDate—
endDate—
allDayboolean—
viewViewType—

Defined in packages/calendar/src/types.ts:193

ToIcsOptionsinterface#

interface ToIcsOptions
PropertyTypeDescription
productIdoptionalstring—
calendarNameoptionalstring—
timestampoptionalDate—
defaultDurationoptionalnumber—

Defined in packages/calendar/src/engine/ics.ts:28

ToolbarOptionsinterface#

interface ToolbarOptions
PropertyTypeDescription
startoptionalstring—
centeroptionalstring—
endoptionalstring—

Defined in packages/calendar/src/types.ts:57

ViewChangePayloadinterface#

interface ViewChangePayload
PropertyTypeDescription
viewViewType—
previousViewViewType—

Defined in packages/calendar/src/types.ts:214

WeekdaySpecinterface#

interface WeekdaySpec
PropertyTypeDescription
weekdaynumber—
ordinaloptionalnumber—

Defined in packages/calendar/src/engine/rrule.ts:18

Types#

DateInputtype#

type DateInput = Date | string | number;

Defined in packages/calendar/src/types.ts:3

EditScopetype#

type EditScope = 'this' | 'all';

Defined in packages/calendar/src/types.ts:9

Frequencytype#

type Frequency = 'DAILY' | 'WEEKLY' | 'MONTHLY' | 'YEARLY';

Defined in packages/calendar/src/engine/rrule.ts:16

InputLimitCodetype#

type InputLimitCode =
  'input-too-long' | 'too-many-rows' | 'too-many-columns' | 'too-many-events' | 'too-many-tasks' | 'too-many-links';

Defined in packages/core/src/input-limits.ts:1

InteractionSourcetype#

type InteractionSource = 'pointer' | 'keyboard';

Defined in packages/calendar/src/types.ts:11

RenderResulttype#

type RenderResult = string | Node | null | undefined;

Defined in packages/calendar/src/types.ts:97

ThemeNametype#

type ThemeName = 'light' | 'dark' | 'auto';

Defined in packages/calendar/src/types.ts:7

ViewTypetype#

type ViewType = 'month' | 'week' | 'day' | 'days' | 'agenda' | 'year';

Defined in packages/calendar/src/types.ts:5

↑ ↓ to move, Enter to open, Esc to close