I'm using fullcalendar with month, agendaWeek, and agendaDay(with resources) views and I'm facing some problems with Today button in agendaDay view. While Prev and Next buttons work as supposed, I need to click on Today button twice to trigger the click event, even though it only needs one click in other views.
$('#calendar').fullCalendar({
...
viewRender: function () {
var $todayButton = $('.fc-today-button');
$todayButton.removeClass('fc-state-disabled');
$todayButton.prop('disabled', false);
},
...
});
$(document).on('click', '.fc-prev-button, .fc-today-button, .fc-next-button', function () {
console.log('CLICKED!');
});
UPDATE: The problem disappears when I delete these lines from fullcalendar setup:
$('#calendar').fullCalendar({
...
refetchResourcesOnNavigate: true,
resources: '/my-path/resources',
...
});