packages/lwc-calendar/README.md
FullCalendar LWC packages the FullCalendar global build as a Salesforce static resource and wraps it in a Lightning Web Component. The release zip includes the programmatic fullCalendar component and a fullCalendarDemo component that demonstrates a complete Lightning App Builder integration.
fullcalendar-lwc-<version>.zip from GitHub Releases.force-app/main/default/ into your SFDX project's corresponding package directory.sf project deploy start.Minimal usage:
<c-full-calendar options={calendarOptions}></c-full-calendar>
With an explicit theme, palette, and locale (theme-palette is optional; each theme has a default palette):
<c-full-calendar
options={calendarOptions}
theme="forma"
theme-palette="blue"
locale="en-gb"
></c-full-calendar>
Available themes and their palettes (default palette in bold):
classic — single built-in palette (theme-palette is ignored)breezy — amber, emerald, indigo, roseforma — blue, green, purple, redmonarch — blue, green, purple, red, yellowpulse — blue, green, purple, redAdditional FullCalendar global-plugin scripts (such as the premium Scheduler runtime shipped by the lwc-scheduler package) can be supplied as static-resource URLs through plugin-urls; the component loads them and applies their plugins during initialization.
With event handling:
<c-full-calendar
options={calendarOptions}
oneventclick={handleEventClick}
></c-full-calendar>
handleEventClick(event) {
console.log(event.detail)
}
The wrapper only reacts when the options object is reassigned. Mutating the existing object in place will not trigger updates.
this.calendarOptions = {
...this.calendarOptions,
weekends: !this.calendarOptions.weekends,
}
After initialization, the wrapper passes reassigned options through FullCalendar's resetOptions connector API. Changes to the component's top-level locale prop load the matching locale global asynchronously before updating the calendar. The special-handling locale setting must be supplied through this prop, not through options.
The low-level fullCalendar component is intended for programmatic composition and does not appear in Lightning App Builder. The included FullCalendar Demo component provides representative toolbar, event, interaction, theme, palette, and locale configuration.
To try it after deployment:
Use fullCalendarDemo as reference code for an application-specific wrapper that supplies its own options, data, and callbacks.
Call getCalendar() on the component instance to access the underlying FullCalendar Calendar instance:
const calendar = this.template.querySelector('c-full-calendar').getCalendar()
calendar.next()
themePalette and pluginUrls are set once during initial render. Recreate the component to change them. theme may be changed at any time; the new theme's assets load asynchronously before it is applied.window.FullCalendar.event.detail.The lwc-calendar directory name is intentional. When this package directory was named exactly lwc, Salesforce CLI treated that ancestor as the special LWC metadata directory and incorrectly interpreted its dist child as a LightningComponentBundle named dist. Deployments then failed with Cannot find Lightning Component Bundle dist.
Do not rename this repository directory to lwc unless the Salesforce CLI path-resolution behavior has been fixed and verified. This workaround affects only the repository directory: the npm package remains @fullcalendar/lwc, and the Salesforce component remains fullCalendar.
Build the deployable source tree:
pnpm build
This writes dist/force-app/main/default/....
Create the release zip from the built source tree:
pnpm archive
This writes archives/fullcalendar-lwc-<version>.zip.
Remove all build and archive output with:
pnpm clean
For local Salesforce smoke testing, build and deploy directly from this package:
pnpm build
pnpm run smoke:login # only when the fullcalendar-dev alias is unavailable
pnpm run smoke:deploy
Use the main FullCalendar documentation for the complete options surface: