mercredi 13 juillet 2016

Fullcalendar days background color upon ajax data

Im using fullcalendar and i need to paint the background color of some days upon an ajax request.

I have some classrooms and they can be busy or free, so i want to paint the background color of the day cell matching if the classroom is free or not.

I know how to change events colors but i dont know how to do it with the day cells, i also know that this function is called when days are rendered:

dayRender: function (date, cell) {
            console.log(cell[0].dataset.date);
        }

So i could have a javascript array with the days that have to be marked as busy, but how do i update that array when the user changes of month?

Thanks!

Aucun commentaire:

Enregistrer un commentaire