In my FullCalendar application, more specifically on the month view visualization, I have a link that appears whenever 3 or more events are added to the same day, then I want to make that link lead to the day view mode for that particular day.
$(".events-view-more a").click(function () {
alert("clicou");
});
The parent (parent of .events-view-more a) td element contains a data attribute with the date value containing something like "2013-11-29".
How can I use this to change the visualization mode to day view of that day?
Something like this will take you from the Month view to the Day view if you click anywhere on the cell in the Month view:
$('#calendar').fullCalendar({
//other parameters here
dayClick: function(date, jsEvent, view) {
$('#calendar').fullCalendar('gotoDate',date);
$('#calendar').fullCalendar('changeView','agendaDay');
}
});
Hopefully this is useful for others, I know it is an old post.
$(".events-view-more a").click(function () {
var date=new Date($(this).parents('td').attr('date'));
$('#fullCalendar').fullCalendar('gotoDate', date.getFullYear(), date.getMonth(), date.getDate());
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With