angular-ui / ui-calendar

A complete AngularJS directive for the Arshaw FullCalendar.
http://angular-ui.github.io/ui-calendar/
MIT License
1.49k stars 729 forks source link

Error when using new fullcalendar version 3.10.2 #546

Open benneq opened 4 years ago

benneq commented 4 years ago

After upgrading from fullcalendar 3.10.1 to 3.10.2 (Release: https://github.com/fullcalendar/fullcalendar/releases/tag/v3.10.2 ) I get the following error:

TypeError: calendar.fullCalendar is not a function
    at Scope.scope.initCalendar (calendar.js:265)

In angular-ui-calendar 1.0.2 source code it's this line:

scope.initCalendar = function(){
  if (!calendar) {
    calendar = angular.element(elm).html('');
  }
  calendar.fullCalendar(options); // <- THIS LINE
  if(attrs.calendar) {
    uiCalendarConfig.calendars[attrs.calendar] = calendar;
  }          
};

When downgrading to fullcalendar 3.10.1 everything is working again. Only 3.10.2 throws this error.