I'm using FullCalendar v2.3.0,
When I click a date, background color of the cell is changed as 'its booked', Its working perfectly with addEventSource,(stored selected date in an array) when im clicking once agian to the selected date, need to change the background color of the cell as white (available for booking),
How to remove the cell color as original? How to remove the event using .fullCalendar( 'removeEventSource', source ) for a particular date...
select: function (start, end, jsEvent, view, cell, calEvent) {
if (jQuery.inArray(moment(start).format('YYYY-MM-DD'), sel_dates) == -1) {
sel_dates.push(moment(start).format('YYYY-MM-DD'));
$("#calendar").fullCalendar('addEventSource', [{
start: start,
end: end,
rendering: 'background'
}]);
}
else {
sel_dates.pop(moment(start).format('YYYY-MM-DD'));
// Here i need to change the cell background color
}
}