@fullcalendar/web-component-scheduler
v7.1.5
Published
FullCalendar Web Component Scheduler package
Maintainers
Readme
FullCalendar Web Component Scheduler
FullCalendar Web Component Scheduler package, for rendering resource views
Installation
npm install @fullcalendar/web-component @fullcalendar/web-component-scheduler temporal-polyfillComing from v6?
In v7, the premium plugins are part of this package, imported from subpaths like @fullcalendar/web-component-scheduler/resource-timeline, and the standard plugins come from @fullcalendar/web-component (e.g. @fullcalendar/web-component/daygrid). The separate @fullcalendar/resource, @fullcalendar/resource-timeline, @fullcalendar/timeline, @fullcalendar/core, @fullcalendar/daygrid (etc.) packages are FullCalendar v6. Don't install them with v7, and don't downgrade to v6: uninstall them and import plugins from @fullcalendar/web-component-scheduler/resource-timeline and @fullcalendar/web-component/daygrid. See the upgrade guide.
Usage
Render a FullCalendar component with options, including one or more scheduler plugins:
// globally installs the <full-calendar> tag
import '@fullcalendar/web-component/global'
// plugins
import themePlugin from '@fullcalendar/web-component/themes/monarch' // YOUR THEME
import interactionPlugin from '@fullcalendar/web-component/interaction'
import resourceTimelinePlugin from '@fullcalendar/web-component-scheduler/resource-timeline'
// stylesheets
import '@fullcalendar/web-component/skeleton.styles' // ALWAYS NEED SKELETON
import '@fullcalendar/web-component/themes/monarch/theme.styles' // YOUR THEME
import '@fullcalendar/web-component/themes/monarch/palettes/purple.css' // YOUR THEME'S PALETTE
// initialize with options and plugins
const fullCalendarElement = document.querySelector('full-calendar')
fullCalendarElement.options = {
plugins: [themePlugin, interactionPlugin, resourceTimelinePlugin],
initialView: 'resourceTimelineWeek',
schedulerLicenseKey: 'YOUR-LICENSE-KEY',
editable: true,
events: [
{ id: '1', resourceId: 'a', title: 'Meeting', start: new Date() },
],
resources: [
{ id: 'a', title: 'Resource A' },
{ id: 'b', title: 'Resource B' },
]
}Please note, skeleton.styles and theme.styles are JS, and yes they do inject CSS. This is required for the web component’s shadow DOM.
Then, in your HTML:
<full-calendar></full-calendar>Plugins
| Import | Provides |
| --------------------------------------------------------- | -------------------------------------------------------- |
| @fullcalendar/web-component-scheduler/resource-timeline | resourceTimelineDay/Week/Month/Year views |
| @fullcalendar/web-component-scheduler/resource-timegrid | resourceTimeGridDay/Week views |
| @fullcalendar/web-component-scheduler/resource-daygrid | resourceDayGridDay/Week/Month views |
| @fullcalendar/web-component-scheduler/timeline | timelineDay/Week/Month/Year views (no resources) |
| @fullcalendar/web-component-scheduler/scrollgrid | enhanced scroll-related features for large grids |
| @fullcalendar/web-component-scheduler/adaptive | print-optimized rendering |
