TroubleshootingCalendar
Fix Event Calendar events that do not appear or show at the wrong hour, an event source that does not reload, ignored recurrence rules, sizing, missing styles and watermarks.
The calendar reports bad options and event data in the console with the prefix [Birch UI Event Calendar], once per message, and keeps rendering. Errors thrown by your callbacks are logged as [Birch UI Event Calendar] <name> threw an error.
| Symptom | Jump to |
|---|---|
| The page grows very tall, or the week view does not scroll | The calendar has the wrong height |
| The calendar is unstyled | The calendar has no styles |
Event "…" has an invalid start… |
An event does not appear |
| Events show a few hours early or late | Events show at the wrong time |
Event "…" has an unknown timeZone… |
Events show at the wrong time |
| New server data does not show up | The event source does not reload |
[Birch UI Event Calendar] eventSource threw an error. |
The event source fails |
… uses unsupported RRULE parts… |
A recurrence rule is only partly applied |
Invalid "…" option … |
An option is ignored |
| "Birch UI Event Calendar · unlicensed copy" in the corner | A watermark appears |
Refused to apply inline style in the console |
A Content Security Policy blocks the styles |
| Two copies of a package, or a large bundle | Duplicate packages and bundle size |
| Problems only in React, Vue, Svelte or Angular | Framework adapters |
The calendar has the wrong height#
Cause. height defaults to 'auto', so the calendar grows to fit its content. A week view from midnight to midnight, or a long agenda, then makes the page very tall and nothing scrolls inside the calendar.
Fix. Pass a number of pixels for a fixed height with scrolling inside, and narrow the visible hours if you like:
createCalendar(document.querySelector<HTMLElement>('#clinic')!, {
view: 'week',
height: 720,
dayStartHour: 7,
dayEndHour: 20,
scrollToHour: 8,
events: appointments,
});The calendar has no styles#
Cause. With injectStyles: false, the calendar does not add its stylesheet.
Fix. Import @birchui/calendar/styles.css, or insert the exported calendarStyles string into a shadow root yourself. See Importing the CSS file.
A Content Security Policy blocks the styles#
Cause. Injected styles are a <style> element, which a style-src policy without 'unsafe-inline' blocks. The injected element has no nonce option.
Fix. Set injectStyles: false and import @birchui/calendar/styles.css through your bundler.
An event does not appear#
Cause. An event whose start cannot be read is dropped and logged as Event "visit-2291" has an invalid start "08/12/2026" and is not shown. An unreadable end logs … has an invalid end "…"; the default duration is used. Events also stay hidden when they fall on a day removed by weekends: false or hiddenDays, or outside the range the current view shows.
Fix. Use ISO 8601 strings such as '2026-12-08T13:00', Date objects or epoch milliseconds. Navigate with gotoDate('2026-12-08') to check the date. Date-only end values are exclusive, so a two-day event on 24 and 25 December ends on '2026-12-26'. See How event times are read.
Events show at the wrong time#
Cause. A time without an offset and without an event timeZone is floating: it shows at that wall-clock time in whatever zone the calendar displays. A UTC instant such as '2026-12-08T19:00:00Z' is converted to the display zone, which defaults to the browser's. An event timeZone that is not a valid IANA name logs Event "…" has an unknown timeZone "…"; it is shown as floating time.
Fix. Choose the form that matches your data: instants for times your server stores in UTC, a timeZone on the event for times tied to a place, and floating times for local reminders. Set the calendar's timeZone when every viewer must see the same zone:
createCalendar(container, { view: 'week', timeZone: 'America/Chicago', events: siteVisits });See Time zones.
The event source does not reload#
Cause. eventSource is called when the calendar is created and when the visible range changes. Returning to a range that is already loaded does not call it again, and neither does replacing the source with update({ eventSource }), changing timeZone, or saving data on your server.
Fix. Call refetch() after those changes:
await fetch('/api/site-visits', { method: 'POST', body: JSON.stringify(newVisit) });
await calendar.refetch();See When the source is called.
The event source fails#
Cause. When the source rejects or throws, the calendar logs [Birch UI Event Calendar] eventSource threw an error. with the error, ends the loading state and keeps the events from the last successful load. It does not retry. Aborted requests are ignored.
Fix. Catch the error inside the source to show a message, rethrow it, and call refetch() from a retry button. See Errors.
A recurrence rule is only partly applied#
Cause. Rule parts the engine does not support are dropped with Event "…" uses unsupported RRULE parts (…); they are ignored.
Fix. Rewrite the rule with the supported rule parts, or list the extra dates as separate events.
An option is ignored#
Cause. An invalid option value falls back to its default with Invalid "<name>" option <value>; using <default>. Hiding every weekday logs Every weekday is hidden by "hiddenDays"/"weekends"; showing all days instead. An unknown view name passed to setView logs Unknown view "…".
Fix. Correct the value named in the warning. The API page lists every option and its accepted values.
A watermark appears#
Cause. The calendar checks its key for calendar offline. On a non-local host with no valid key, a watermark appears and one warning is logged, for example:
[Birch UI] No license key is set for Birch UI Event Calendar. All features keep working; a watermark is shown on non-local hosts until a valid license key is set. Purchase a license at https://birchui.com/pricingFix. Call setLicenseKey from @birchui/license in the browser bundle, or pass licenseKey to createCalendar. With server rendering, expose the key through a public variable such as NEXT_PUBLIC_BIRCHUI_LICENSE_KEY; see The license key is not applied with server rendering and What happens without a valid key.
Duplicate packages and bundle size#
Cause. Two installed versions of @birchui/core or @birchui/license split their state, so a key set in one copy is not seen by the other.
Fix. Run npm ls @birchui/core @birchui/license, align all @birchui/* packages on one version and run npm dedupe, or add overrides in package.json. The package is side-effect free apart from its CSS, so functions you do not import, such as parseICS and toICS, are left out of the bundle.
Framework adapters#
Wrap the calendar with createReactComponent(calendarDefinition) or the equivalent factory, as shown in Event Calendar in React. For Strict Mode, reactive proxies and the Angular zone, see:
- The widget is created twice in development
- Changes to rows do not reach the widget, which applies to
events - The widget updates on every render, for inline
eventSourcefunctions - Angular views do not update after a widget event