is there a way to go to the agandaDay of the clicked day. The code below is what I have so far but it's not working.
dayClick: function(date, allDay, jsEvent, view) {
$('#calendar').fullCalendar('changeView', 'agendaDay')
.fullCalendar('gotoDate', date);
}
What this does it goes to either the current date (today) or to the last manually accessed date. What else do I need to do to make go to the agendaDay of the clicked day/date?
is there a way to go to the agandaDay of the clicked day. The code below is what I have so far but it's not working.
dayClick: function(date, allDay, jsEvent, view) {
$('#calendar').fullCalendar('changeView', 'agendaDay')
.fullCalendar('gotoDate', date);
}
What this does it goes to either the current date (today) or to the last manually accessed date. What else do I need to do to make go to the agendaDay of the clicked day/date?
Share Improve this question asked Sep 12, 2014 at 11:26 Richard TonataRichard Tonata 3631 gold badge6 silver badges14 bronze badges2 Answers
Reset to default 3FullCalendar (I think from 2.0) uses momentjs library to deal with dates
date must be calculated previously, before passing to fullcalendar:
var date = $.fullCalendar.moment('2014-05-01');
Detailed instructions:
Goto http://fullcalendar.io/js/fullcalendar-2.1.1/demos/basic-views.html
Open console and put these lines, line by line (I think this is the issue):
var date = $.fullCalendar.moment('2014-05-01');
$('#calendar').fullCalendar('changeView', 'agendaDay');
$('#calendar').fullCalendar('gotoDate',date);
You got this result (image)
The reason that cascade:
$('#calendar').fullCalendar('changeView', 'agendaDay').fullCalendar('gotoDate',date);
does not work is that returning valur from changeView is not return any object
Late to the answer, but just ran into this myself and thought this fiddle would be helpful: http://jsfiddle/88n10j7f/
dayClick: function(date, jsEvent, view) {
$('.calendar').fullCalendar('changeView', 'agendaDay')
$('.calendar').fullCalendar('gotoDate', date);
}