# @birchui/calendar API reference

> Birch UI Event Calendar: month, week, day, agenda and year views with recurrence and time zones

```bash
npm install @birchui/calendar
```

## @birchui/calendar

### createCalendar

Kind: function. Import from `@birchui/calendar`.

```ts
function createCalendar<TEvent extends CalendarEvent = CalendarEvent>(container: HTMLElement, options: CalendarOptions<TEvent> = {}): CalendarApi<TEvent>
```

| Parameter | Type | Description |
| --- | --- | --- |
| `container` | `HTMLElement` |  |
| `options?` | `CalendarOptions<TEvent>` |  |

### expandRRule

Kind: function. Import from `@birchui/calendar`.

```ts
function expandRRule(rule: RRule, dtstart: number, options: ExpandOptions = {}): number[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rule` | `RRule` |  |
| `dtstart` | `number` |  |
| `options?` | `ExpandOptions` |  |

### formatRRule

Kind: function. Import from `@birchui/calendar`.

```ts
function formatRRule(rule: RRule): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `rule` | `RRule` |  |

### parseICS

Kind: function. Import from `@birchui/calendar`.

```ts
function parseICS(text: string, options: ParseIcsOptions = {}): IcsEvent[]
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |
| `options?` | `ParseIcsOptions` |  |

### parseRRule

Kind: function. Import from `@birchui/calendar`.

```ts
function parseRRule(text: string): RRule
```

| Parameter | Type | Description |
| --- | --- | --- |
| `text` | `string` |  |

### toICS

Kind: function. Import from `@birchui/calendar`.

```ts
function toICS(events: readonly CalendarEvent[], options: ToIcsOptions = {}): string
```

| Parameter | Type | Description |
| --- | --- | --- |
| `events` | `readonly CalendarEvent[]` |  |
| `options?` | `ToIcsOptions` |  |

### InputLimitError

Kind: class. Import from `@birchui/calendar`.

```ts
class InputLimitError extends Error
new InputLimitError(readonly code: InputLimitCode, readonly limit: number, readonly actual: number, message: string)
```

| Property | Type | Description |
| --- | --- | --- |
| `readonly name` | `"InputLimitError"` |  |
| `readonly code` | `InputLimitCode` |  |
| `readonly limit` | `number` |  |
| `readonly actual` | `number` |  |

### RRuleError

Kind: class. Import from `@birchui/calendar`.

```ts
class RRuleError extends Error
new RRuleError(message: string)
```

### CALENDAR_EVENTS

Kind: const. Import from `@birchui/calendar`.

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

### calendarDefinition

Kind: const. Import from `@birchui/calendar`.

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

### calendarStyles

Kind: const. Import from `@birchui/calendar`.

```ts
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; } } `
```

### DEFAULT_ICS_LIMITS

Kind: const. Import from `@birchui/calendar`.

```ts
const DEFAULT_ICS_LIMITS: Readonly<IcsLimits>
```

### BusinessHours

Kind: interface. Import from `@birchui/calendar`.

```ts
interface BusinessHours
```

| Property | Type | Description |
| --- | --- | --- |
| `daysOfWeek?` | `number[]` |  |
| `startTime?` | `string` |  |
| `endTime?` | `string` |  |

### CalendarApi

Kind: interface. Import from `@birchui/calendar`.

```ts
interface CalendarApi<TEvent extends CalendarEvent = CalendarEvent> extends Widget< CalendarOptions<TEvent>, CalendarEventMap<TEvent> >
```

| Property | Type | Description |
| --- | --- | --- |
| `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` |  |
| `readonly element` | `HTMLElement` | Inherited from Widget. |
| `update` | `(options: Partial<CalendarOptions<TEvent>>) => void` | Inherited from Widget. |
| `on` | `<K extends keyof TEvents & string>(event: K, listener: Listener<TEvents[K]>) => () => void` | Inherited from Widget. |
| `destroy` | `() => void` | Inherited from Widget. |

### CalendarEvent

Kind: interface. Import from `@birchui/calendar`.

```ts
interface CalendarEvent
[key: string]: unknown
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string \| number` |  |
| `title` | `string` |  |
| `start` | `DateInput` |  |
| `end?` | `DateInput` |  |
| `allDay?` | `boolean` |  |
| `color?` | `string` |  |
| `rrule?` | `string` |  |
| `exdates?` | `DateInput[]` |  |
| `timeZone?` | `string` |  |
| `editable?` | `boolean` |  |

### CalendarEventMap

Kind: interface. Import from `@birchui/calendar`.

```ts
interface CalendarEventMap<TEvent extends CalendarEvent = CalendarEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `ready` | `RangeChangePayload` |  |
| `eventClick` | `EventPointerPayload<TEvent>` |  |
| `eventDoubleClick` | `EventPointerPayload<TEvent>` |  |
| `eventDrop` | `EventDropPayload<TEvent>` |  |
| `eventResize` | `EventResizePayload<TEvent>` |  |
| `eventRemove` | `EventRemovePayload<TEvent>` |  |
| `select` | `SelectPayload` |  |
| `dateClick` | `DateClickPayload` |  |
| `viewChange` | `ViewChangePayload` |  |
| `rangeChange` | `RangeChangePayload` |  |
| `moreClick` | `MoreClickPayload<TEvent>` |  |
| `loading` | `{ isLoading: boolean }` |  |

### CalendarLabels

Kind: interface. Import from `@birchui/calendar`.

```ts
interface CalendarLabels
```

| Property | Type | Description |
| --- | --- | --- |
| `today` | `string` |  |
| `previous` | `string` |  |
| `next` | `string` |  |
| `allDay` | `string` |  |
| `timeGrid` | `string` |  |
| `noEvents` | `string` |  |
| `recurring` | `string` |  |
| `close` | `string` |  |
| `loading` | `string` |  |
| `viewSwitcher` | `string` |  |
| `views` | `Record<ViewType, string>` |  |
| `more` | `(count: number) => string` |  |
| `eventCount` | `(count: number) => string` |  |
| `eventRemoved` | `(title: string) => string` |  |

### CalendarOptions

Kind: interface. Import from `@birchui/calendar`.

```ts
interface CalendarOptions<TEvent extends CalendarEvent = CalendarEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `events?` | `TEvent[]` |  |
| `eventSource?` | `(request: EventSourceRequest) => Promise<TEvent[]>` |  |
| `view?` | `ViewType` |  |
| `views?` | `ViewType[]` |  |
| `date?` | `DateInput` |  |
| `firstDay?` | `number` |  |
| `locale?` | `string` |  |
| `timeZone?` | `string` |  |
| `hour12?` | `boolean` |  |
| `slotMinutes?` | `number` |  |
| `snapMinutes?` | `number` |  |
| `slotHeight?` | `number` |  |
| `dayStartHour?` | `number` |  |
| `dayEndHour?` | `number` |  |
| `scrollToHour?` | `number` |  |
| `businessHours?` | `boolean \| BusinessHours \| BusinessHours[]` |  |
| `weekends?` | `boolean` |  |
| `hiddenDays?` | `number[]` |  |
| `dayCount?` | `number` |  |
| `agendaDays?` | `number` |  |
| `defaultTimedDuration?` | `number` |  |
| `maxEventsPerDay?` | `number` |  |
| `nowIndicator?` | `boolean` |  |
| `navLinks?` | `boolean` |  |
| `readOnly?` | `boolean` |  |
| `selectable?` | `boolean` |  |
| `headerToolbar?` | `false \| ToolbarOptions` |  |
| `viewSwitcher?` | `boolean` |  |
| `height?` | `'auto' \| number` |  |
| `theme?` | `ThemeName` |  |
| `injectStyles?` | `boolean` |  |
| `licenseKey?` | `string` |  |
| `labels?` | `Partial<CalendarLabels>` |  |
| `localeText?` | `LocaleTextInput` |  |
| `rtl?` | `boolean` |  |
| `now?` | `() => DateInput` |  |
| `eventRenderer?` | `(occurrence: EventOccurrence<TEvent>, context: EventRenderContext) => RenderResult` |  |
| `dayCellRenderer?` | `(context: DayCellContext) => RenderResult` |  |
| `validateDrop?` | `(info: DropInfo<TEvent>) => boolean` |  |
| `validateResize?` | `(info: ResizeInfo<TEvent>) => boolean` |  |

### DateClickPayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface DateClickPayload
```

| Property | Type | Description |
| --- | --- | --- |
| `date` | `Date` |  |
| `allDay` | `boolean` |  |
| `view` | `ViewType` |  |
| `nativeEvent` | `Event` |  |

### DateRange

Kind: interface. Import from `@birchui/calendar`.

```ts
interface DateRange
```

| Property | Type | Description |
| --- | --- | --- |
| `start` | `Date` |  |
| `end` | `Date` |  |

### DayCellContext

Kind: interface. Import from `@birchui/calendar`.

```ts
interface DayCellContext
```

| Property | Type | Description |
| --- | --- | --- |
| `date` | `Date` |  |
| `dateKey` | `string` |  |
| `view` | `ViewType` |  |
| `isToday` | `boolean` |  |
| `isOtherMonth` | `boolean` |  |
| `eventCount` | `number` |  |

### DropInfo

Kind: interface. Import from `@birchui/calendar`.

```ts
interface DropInfo<TEvent extends CalendarEvent = CalendarEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `event` | `TEvent` |  |
| `occurrence` | `EventOccurrence<TEvent>` |  |
| `start` | `Date` |  |
| `end` | `Date` |  |
| `allDay` | `boolean` |  |

### EventChangePayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface EventChangePayload<TEvent extends CalendarEvent = CalendarEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `event` | `TEvent` |  |
| `occurrence` | `EventOccurrence<TEvent>` |  |
| `start` | `Date` |  |
| `end` | `Date` |  |
| `allDay` | `boolean` |  |
| `oldStart` | `Date` |  |
| `oldEnd` | `Date` |  |
| `oldAllDay` | `boolean` |  |
| `isRecurring` | `boolean` |  |
| `scope` | `EditScope` |  |
| `source` | `InteractionSource` |  |
| `revert` | `() => void` |  |

### EventDropPayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface EventDropPayload<TEvent extends CalendarEvent = CalendarEvent> extends EventChangePayload<TEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `delta` | `number` |  |
| `event` | `TEvent` | Inherited from EventChangePayload. |
| `occurrence` | `EventOccurrence<TEvent>` | Inherited from EventChangePayload. |
| `start` | `Date` | Inherited from EventChangePayload. |
| `end` | `Date` | Inherited from EventChangePayload. |
| `allDay` | `boolean` | Inherited from EventChangePayload. |
| `oldStart` | `Date` | Inherited from EventChangePayload. |
| `oldEnd` | `Date` | Inherited from EventChangePayload. |
| `oldAllDay` | `boolean` | Inherited from EventChangePayload. |
| `isRecurring` | `boolean` | Inherited from EventChangePayload. |
| `scope` | `EditScope` | Inherited from EventChangePayload. |
| `source` | `InteractionSource` | Inherited from EventChangePayload. |
| `revert` | `() => void` | Inherited from EventChangePayload. |

### EventOccurrence

Kind: interface. Import from `@birchui/calendar`.

```ts
interface EventOccurrence<TEvent extends CalendarEvent = CalendarEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `id` | `string` |  |
| `occurrenceId` | `string` |  |
| `title` | `string` |  |
| `start` | `Date` |  |
| `end` | `Date` |  |
| `allDay` | `boolean` |  |
| `color` | `string \| undefined` |  |
| `recurring` | `boolean` |  |
| `recurrenceId` | `string \| undefined` |  |
| `editable` | `boolean` |  |
| `event` | `TEvent` |  |

### EventPointerPayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface EventPointerPayload<TEvent extends CalendarEvent = CalendarEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `event` | `TEvent` |  |
| `occurrence` | `EventOccurrence<TEvent>` |  |
| `element` | `HTMLElement` |  |
| `nativeEvent` | `Event` |  |

### EventRemovePayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface EventRemovePayload<TEvent extends CalendarEvent = CalendarEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `event` | `TEvent` |  |
| `occurrence` | `EventOccurrence<TEvent>` |  |
| `isRecurring` | `boolean` |  |
| `scope` | `EditScope` |  |
| `source` | `InteractionSource` |  |
| `revert` | `() => void` |  |

### EventRenderContext

Kind: interface. Import from `@birchui/calendar`.

```ts
interface EventRenderContext
```

| Property | Type | Description |
| --- | --- | --- |
| `view` | `ViewType` |  |
| `timeText` | `string` |  |
| `isStart` | `boolean` |  |
| `isEnd` | `boolean` |  |
| `isMirror` | `boolean` |  |

### EventResizePayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface EventResizePayload<TEvent extends CalendarEvent = CalendarEvent> extends EventChangePayload<TEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `edge` | `'start' \| 'end'` |  |
| `event` | `TEvent` | Inherited from EventChangePayload. |
| `occurrence` | `EventOccurrence<TEvent>` | Inherited from EventChangePayload. |
| `start` | `Date` | Inherited from EventChangePayload. |
| `end` | `Date` | Inherited from EventChangePayload. |
| `allDay` | `boolean` | Inherited from EventChangePayload. |
| `oldStart` | `Date` | Inherited from EventChangePayload. |
| `oldEnd` | `Date` | Inherited from EventChangePayload. |
| `oldAllDay` | `boolean` | Inherited from EventChangePayload. |
| `isRecurring` | `boolean` | Inherited from EventChangePayload. |
| `scope` | `EditScope` | Inherited from EventChangePayload. |
| `source` | `InteractionSource` | Inherited from EventChangePayload. |
| `revert` | `() => void` | Inherited from EventChangePayload. |

### EventSourceRequest

Kind: interface. Import from `@birchui/calendar`.

```ts
interface EventSourceRequest extends DateRange
```

| Property | Type | Description |
| --- | --- | --- |
| `signal` | `AbortSignal` |  |
| `timeZone` | `string` |  |
| `start` | `Date` | Inherited from DateRange. |
| `end` | `Date` | Inherited from DateRange. |

### ExpandOptions

Kind: interface. Import from `@birchui/calendar`.

```ts
interface ExpandOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `start?` | `number` |  |
| `end?` | `number` |  |
| `untilToWall?` | `(instant: number) => number` |  |
| `limit?` | `number` |  |

### IcsEvent

Kind: interface. Import from `@birchui/calendar`.

```ts
interface IcsEvent extends CalendarEvent
```

| Property | Type | Description |
| --- | --- | --- |
| `description?` | `string` |  |
| `location?` | `string` |  |
| `url?` | `string` |  |
| `status?` | `string` |  |
| `categories?` | `string[]` |  |
| `recurrenceId?` | `string` |  |
| `recurringEventId?` | `string` |  |
| `id` | `string \| number` | Inherited from CalendarEvent. |
| `title` | `string` | Inherited from CalendarEvent. |
| `start` | `DateInput` | Inherited from CalendarEvent. |
| `end?` | `DateInput \| undefined` | Inherited from CalendarEvent. |
| `allDay?` | `boolean \| undefined` | Inherited from CalendarEvent. |
| `color?` | `string \| undefined` | Inherited from CalendarEvent. |
| `rrule?` | `string \| undefined` | Inherited from CalendarEvent. |
| `exdates?` | `DateInput[] \| undefined` | Inherited from CalendarEvent. |
| `timeZone?` | `string \| undefined` | Inherited from CalendarEvent. |
| `editable?` | `boolean \| undefined` | Inherited from CalendarEvent. |

### IcsLimits

Kind: interface. Import from `@birchui/calendar`.

```ts
interface IcsLimits
```

| Property | Type | Description |
| --- | --- | --- |
| `maxLength` | `number` |  |
| `maxEvents` | `number` |  |

### MoreClickPayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface MoreClickPayload<TEvent extends CalendarEvent = CalendarEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `date` | `Date` |  |
| `occurrences` | `EventOccurrence<TEvent>[]` |  |
| `hiddenCount` | `number` |  |
| `preventDefault` | `() => void` |  |

### OccurrenceChanges

Kind: interface. Import from `@birchui/calendar`.

```ts
interface OccurrenceChanges
```

| Property | Type | Description |
| --- | --- | --- |
| `start?` | `DateInput` |  |
| `end?` | `DateInput` |  |
| `allDay?` | `boolean` |  |

### ParseIcsOptions

Kind: interface. Import from `@birchui/calendar`.

```ts
interface ParseIcsOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `limits?` | `Partial<IcsLimits>` |  |

### RangeChangePayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface RangeChangePayload extends DateRange
```

| Property | Type | Description |
| --- | --- | --- |
| `view` | `ViewType` |  |
| `start` | `Date` | Inherited from DateRange. |
| `end` | `Date` | Inherited from DateRange. |

### ResizeInfo

Kind: interface. Import from `@birchui/calendar`.

```ts
interface ResizeInfo<TEvent extends CalendarEvent = CalendarEvent> extends DropInfo<TEvent>
```

| Property | Type | Description |
| --- | --- | --- |
| `edge` | `'start' \| 'end'` |  |
| `event` | `TEvent` | Inherited from DropInfo. |
| `occurrence` | `EventOccurrence<TEvent>` | Inherited from DropInfo. |
| `start` | `Date` | Inherited from DropInfo. |
| `end` | `Date` | Inherited from DropInfo. |
| `allDay` | `boolean` | Inherited from DropInfo. |

### RRule

Kind: interface. Import from `@birchui/calendar`.

```ts
interface RRule
```

| Property | Type | Description |
| --- | --- | --- |
| `freq` | `Frequency` |  |
| `interval` | `number` |  |
| `count?` | `number` |  |
| `until?` | `RRuleUntil` |  |
| `byDay?` | `WeekdaySpec[]` |  |
| `byMonthDay?` | `number[]` |  |
| `byMonth?` | `number[]` |  |
| `bySetPos?` | `number[]` |  |
| `byHour?` | `number[]` |  |
| `byMinute?` | `number[]` |  |
| `bySecond?` | `number[]` |  |
| `wkst` | `number` |  |
| `unsupported?` | `string[]` |  |

### RRuleUntil

Kind: interface. Import from `@birchui/calendar`.

```ts
interface RRuleUntil
```

| Property | Type | Description |
| --- | --- | --- |
| `value` | `number` |  |
| `isUtc` | `boolean` |  |
| `isDateOnly` | `boolean` |  |

### SelectPayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface SelectPayload
```

| Property | Type | Description |
| --- | --- | --- |
| `start` | `Date` |  |
| `end` | `Date` |  |
| `allDay` | `boolean` |  |
| `view` | `ViewType` |  |

### ToIcsOptions

Kind: interface. Import from `@birchui/calendar`.

```ts
interface ToIcsOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `productId?` | `string` |  |
| `calendarName?` | `string` |  |
| `timestamp?` | `Date` |  |
| `defaultDuration?` | `number` |  |

### ToolbarOptions

Kind: interface. Import from `@birchui/calendar`.

```ts
interface ToolbarOptions
```

| Property | Type | Description |
| --- | --- | --- |
| `start?` | `string` |  |
| `center?` | `string` |  |
| `end?` | `string` |  |

### ViewChangePayload

Kind: interface. Import from `@birchui/calendar`.

```ts
interface ViewChangePayload
```

| Property | Type | Description |
| --- | --- | --- |
| `view` | `ViewType` |  |
| `previousView` | `ViewType` |  |

### WeekdaySpec

Kind: interface. Import from `@birchui/calendar`.

```ts
interface WeekdaySpec
```

| Property | Type | Description |
| --- | --- | --- |
| `weekday` | `number` |  |
| `ordinal?` | `number` |  |

### DateInput

Kind: type. Import from `@birchui/calendar`.

```ts
type DateInput = Date | string | number;
```

### EditScope

Kind: type. Import from `@birchui/calendar`.

```ts
type EditScope = 'this' | 'all';
```

### Frequency

Kind: type. Import from `@birchui/calendar`.

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

### InputLimitCode

Kind: type. Import from `@birchui/calendar`.

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

### InteractionSource

Kind: type. Import from `@birchui/calendar`.

```ts
type InteractionSource = 'pointer' | 'keyboard';
```

### RenderResult

Kind: type. Import from `@birchui/calendar`.

```ts
type RenderResult = string | Node | null | undefined;
```

### ThemeName

Kind: type. Import from `@birchui/calendar`.

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

### ViewType

Kind: type. Import from `@birchui/calendar`.

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