In the FullCalendar dayClick event, can I get the events that already exist in clicked date?
http://arshaw.com/fullcalendar/docs/mouse/dayClick/
Let me expla
I've just come across this issue myself whilst finding a solution for entering public holidays on to a calendar. I found this to be a good solution for full day events. I hope this can help someone else further down the line.
$('#calendar').fullCalendar({
eventClick: function (event) {
ShowEditScreen(event.id);
},
dayClick: function (date) {
var events = $('#calendar').fullCalendar('clientEvents');
for (var i = 0; i < events.length; i++) {
if (moment(date).isSame(moment(events[i].start))) {
ShowEditScreen(events[i].id);
break;
}
else if (i == events.length - 1) {
ShowCreateNew(date);
}
}
}
});