Skip to content

Commit

Permalink
Issue #44: Better expose FullCalendar instances
Browse files Browse the repository at this point in the history
  • Loading branch information
indigoxela committed Aug 10, 2024
1 parent 77cef93 commit f2743bc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions js/fullcalendar-views.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,13 @@
$.extend(options, settings.fullcalendar_views_custom);

var calendar = new FullCalendar.Calendar(calendarElem, options);

// Expose calendar to global space and dispatch a custom event, to
// inform modules or themes. An additional way to extend calendars.
Backdrop.fullcalendarInstances = Backdrop.fullcalendarInstances || {};
Backdrop.fullcalendarInstances[id] = calendar;
$(document).trigger('fullCalendar:created', {calendarId: id});

calendar.render();

// Additional event sources as json feeds.
Expand Down

0 comments on commit f2743bc

Please sign in to comment.