Reputation: 1053
I have taken the latest calendar.js from github for ui-calendar but the below code throws error.
$scope.changeView = function(view,calendar) {
uiCalendarConfig.calendars[calendar].fullCalendar('changeView',view);
};
Can someone guide me how to resolve the issue?Error is:
TypeError: Cannot read property 'calendars' of undefined
Upvotes: 0
Views: 1472
Reputation: 26
Try naming your calendar eg. calendar="myCalendar"
After that you can access it with:
uiCalendarConfig.calendars["myCalendar"]
https://github.com/angular-ui/ui-calendar#accessing-the-calendar-object
Upvotes: 1