I am using ui calendar to provide a calendar view in my application.
Question:
The calendar loads fine and the calendar also accepts events just that I can not seem to access the calendar object using $scope.myCalendar.fullCalendar('prev');
through my controller that i am using.
If I am doing this wrong could you please provide an explanation as to how to access the calendar object?
$scope.myCalendar.fullCalendar('prev')
this essentially invokes a function prev() on the encapsulated calendar object.
fullCalendar.js:line 132: var r = calendar[options].apply(calendar, args);
After invoking the function it will return this
which is the result because check this out in fullCalendar.js
function prev() {
renderView(-1);
}
This is not returning anything.
If you want to get date try passing 'getDate' to fullCalendar
$scope.previousEntries = function(){
$scope.myCalendar.fullCalendar('prev');
var calenderDate = $scope.myCalendar.fullCalendar('getDate');
}