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

Handling the "month change" event #435

Open danielrvt opened 7 years ago

danielrvt commented 7 years ago

I've been trying to call a function when I change the month in my calendar using the left and right arrows. Is there a way to do this?

peterver commented 7 years ago

@danielrvt Have you looked at viewRender ? According to the documentation it also gets called when a new date-range is rendered.

http://fullcalendar.io/docs/display/viewRender/

just to see if it works, add the following to your configuration for ui-calendar

viewRender : function (view, element) {
    console.log('new date range start : ', view.start, 'new date range end : ',view.end);
}

hope it helps ! :]

sachinvrg commented 7 years ago

Where is viewRender function ? viewRender : function (view, element) { console.log('new date range start : ', view.start, 'new date range end : ',view.end); } it is giving syntax error ,and the link http://fullcalendar.io/docs/display/viewRender/ is not working