fixing issue when clicking 'today' button, losing events after navigating to previous
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 3 Mar 2017 13:55:35 +0000 (08:55 -0500)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 3 Mar 2017 13:55:35 +0000 (08:55 -0500)
or next months. Added a separate eventlistener to the today button since fullcalendar
renders the today button differently than it does the next and prev buttons

views/front/events/agenda.html

index 36b71b2..ff2f2d1 100644 (file)
                 {literal}month_obj = {start: view.start._d, last: view.end._d};{/literal}
             },
             header: {
-                left: 'prev,next today',
+                left: 'prev,next,today',
                 center: 'title',
                 right: 'month,agendaWeek,agendaDay'
             },
         $(document).on("click", "button.fc-button", function () {
             eventsCalMonthAJAX(month_obj);
         });
+       
+       $('#eventCalendar').find('.fc-today-button').on("click", function(){
+           eventsCalMonthAJAX(month_obj);
+       });
 
         var dates = $(".agenda-event-recur-dates");
         dates.each( function (){