In the FullCalendar dayClick event, can I get the events that already exist in clicked date?-open source projects arshaw/fullcalendar
Alex
Exested answers didn’t work for me so there is working code:
dayClick: function (date, jsEvent, view) {
var count = 0;
date = date.toDate();
var startDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0);
var endDate = new Date(date.getFullYear(), date.getMonth(), date.getDate(), 23, 59, 59);
$('#calendar').fullCalendar('clientEvents', function (event) {
if (event.start.toDate() >= startDate && event.start.toDate() = startDate && event.end.toDate()