Commit 810e1bc1 authored by Jesse Hofmann-Smith's avatar Jesse Hofmann-Smith Committed by Mingsong Hu
Browse files

Issue #3214419 by jessehs, Agogo: Drupal.attachBehaviors should be ran after...

Issue #3214419 by jessehs, Agogo: Drupal.attachBehaviors should be ran after calendar has been rendered
parent df7a6bf3
Loading
Loading
Loading
Loading
+12 −1
Original line number Diff line number Diff line
@@ -250,6 +250,13 @@
    }
  }

  function datesRender (info) {
    Drupal.attachBehaviors(info.el);
  }
  function datesDestroy (info) {
    Drupal.detachBehaviors(info.el);
  }

  // Build the calendar objects.
  function buildCalendars() {
    $('.js-drupal-fullcalendar')
@@ -268,6 +275,10 @@
      calendarOptions.eventClick = eventClick;
      // Bind the drop event handler.
      calendarOptions.eventDrop = eventDrop;
      // Trigger Drupal behaviors when calendar events are updated.
      calendarOptions.datesRender = datesRender;
      // Trigger Drupal behaviors when calendar events are destroyed.
      calendarOptions.datesDestroy = datesDestroy;
      // Language select element.
      var localeSelectorEl = document.getElementById('locale-selector-' + viewIndex);
      // Initial the calendar.