When a user clicks on a day slot in a month view in the Fullcalendar dayClick event I'd like to have an alert saying that this particular date is not available, for example, a Labor Day holiday.
I wrote this code, but it's not working, I need that somebody please help me to understand what is wrong here:
dayClick: function (date, allDay, jsEvent, view) {
var myDate=new Date();
myDate.setFullYear(2012,09,02);
if (date == myDate){
alert('Labor Day Weekend. No reservations available');
$(this).css('background-color', 'red');
return false;
Also, the 'red' slot works for this 'blocked' day, but then when I click on another day on a calendar, it also turns red. What is wrong here? Please help! Thank you very much for your help!