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

.fullCalendar('changeView', viewName) not working in 1.0.2 #446

Open ilDon opened 7 years ago

ilDon commented 7 years ago

I have updated to 1.0.2 and the following code to switch between month/agendWeek/agendaDay stopped working:

if(uiCalendarConfig.calendars['myCalendar']) uiCalendarConfig.calendars['myCalendar'].fullCalendar('changeView', viewName);
else console.log('error with calendar');

To test if it was my code, I downgraded to 1.0.0 and the same code worked.

I then upgraded to 1.0.1 and the above code also worked.

It seems that there might be an issue with the .fullCalendar('changeView', viewName) method.

Additionally, I have noticed that in 1.0.2 the log error with calendar randomly appears. I am not sure if that is related to the issue though, as .fullCalendar('changeView', viewName) never works, even when the error is not thrown.