I started using the FullCalendar plugin recently. I am trying to implement a function on dropping events in the calendar. But before saving to the database, I want to check and disable/prevent dropping external events on dates before today.
Any idea on how to do this?? I am looking for something like the past days getting greyed-out or something like that so that I can display the events already present as well. Just want to prevent the user from dropping an event on a past date.
EDIT:
drop: function (date, jsEvent, ui) {
if(date<currentDate) {
$('#calendar').fullCalendar('removeEvents', event.id);
}
I tried using this method to remove the dropped event from the calendar and to append it to the div again. Even then, it is not getting removed.
Thanks. :)
See Question&Answers more detail:os