I have been using fullCalendar and I am looking to customize the color of specific days. I have successfully created an overlay that is displayed when a user clicks on a particular day. Everything works as expected with the overlay, but now I am encountering issues in changing the color of cells using 'dayRender.' Can anyone offer assistance?
$(document).ready(function() {
$('#cal').fullCalendar({
dayClick: function(date, jsEvent, view) {
var date=date.format('DD/MM/YY');
var overlay = jQuery('<div id="overlay"> </div>');
var label_div=jQuery('<div id=label_date><img src="../icons/cal.png"></div');
var label=jQuery('<label id=current_date>'+date+'</label>');
label.appendTo(label_div);
label_div.appendTo(overlay);
var cross=jQuery('<a href="#" id="close" onclick="frameWarp();"><img src="../icons/cross.png"></a>');
cross.appendTo(overlay);
var overlay_body=jQuery('<div id=overlay_body></div>');
overlay_body.appendTo(overlay);
overlay.appendTo(document.body);
}//overlay complete
// code for changing cell color
dayRender: function (date, cell) {
var today = new Date();
if (date.getDate() === today.getDate()) {
cell.css("background-color", "red");
}
}
})
});