Ionic frames and angular ui calendar issue?

I use the ui calendar to represent the calendar view in my application.

Question: The calendar loads fine, and the calendar also accepts events that I can’t get to access the calendar object using $scope.myCalendar.fullCalendar('prev'); through my controller that I use.

If I am mistaken, could you please explain how to access the calendar object?

Plunker

+6
source share
1 answer
 $scope.myCalendar.fullCalendar('prev') 

this essentially calls the prev () function for the encapsulated calendar object.

 fullCalendar.js:line 132: var r = calendar[options].apply(calendar, args); 

After calling the function, it will return this , which is the result, because check this in fullCalendar.js

 function prev() { renderView(-1); } 

This does not return anything.

If you want to get the date, try passing 'getDate' to fullCalendar

  $scope.previousEntries = function(){ $scope.myCalendar.fullCalendar('prev'); var calenderDate = $scope.myCalendar.fullCalendar('getDate'); } 
0
source

Source: https://habr.com/ru/post/971268/


All Articles