FullCalendar today button user behavior

I have problems with fullCalendar . I use the week view (defaultView: "basicWeek") and the toolbar buttons "today", "previous", "next". And when I click the "Today" button, clicking the "Calendar" button goes to the current week, but the date selection does not change. I want the calendar to move to the current week and select today in the calendar. But I am having trouble redefining the "today's" button click event.

Code example: https://plnkr.co/edit/dv9yiq1CdJxfFTsDg4Yx?p=preview

defaultView: 'basicWeek',
            defaultDate: '2016-01-12',
            selectable: true,
            selectHelper: true,
            select: function(start, end) {
              console.log('select');
                var title = prompt('Event Title:');
                var eventData;
                if (title) {
                    eventData = {
                        title: title,
                        start: start,
                        end: end
                    };
                    $('#calendar').fullCalendar('renderEvent', eventData, true); 
                }
                $('#calendar').fullCalendar('unselect');
            }

, () , "" . , , .

+4
1

"", , .

: https://plnkr.co/edit/62Dx5pVrDDXnwoME5jbU?p=preview

calendar.find('.fc-today-button').click(function(){
  var start = new Date();
  start.setHours(0,0,0,0);
  var end = new Date();
  end.setDate(end.getDate() + 1);
  end.setHours(0,0,0,0);
  calendar.fullCalendar('select', start, end);
});
+1

All Articles