mirror of
https://github.com/wekan/wekan.git
synced 2026-02-26 09:54:08 +01:00
1.1 KiB
1.1 KiB
FullCalendar packaged for Wekan as a Blaze wrapper.
Installation
This package is bundled in Wekan (wekan-fullcalendar).
Usage
{{> fullcalendar calendarOptions}}
Options can be passed directly from a helper:
Template.example.helpers({
calendarOptions() {
return {
id: 'myCalendar',
initialView: 'dayGridMonth',
headerToolbar: {
left: 'title today prev,next',
center: 'timeGridDay,timeGridWeek,dayGridMonth,listMonth',
right: '',
},
events(fetchInfo, successCallback) {
successCallback([]);
},
};
},
});
Compatibility notes
- Uses FullCalendar v5 modules (
@fullcalendar/*) and no longer uses jQuery plugin APIs. - Legacy options are mapped for compatibility:
defaultView->initialViewheader->headerToolbar
Refetching events
If you provide an id, the wrapper stores the calendar instance on the container
element as _wekanCalendar:
const el = document.getElementById('myCalendar');
if (el && el._wekanCalendar) {
el._wekanCalendar.refetchEvents();
}