I use django with fullcalendar and I want to change the color of days based of user's schedule.
here is the structure of the user's schedule:
Sunday: off // e.g. color should be blue
Monday: work // e.g. color should be pink
Tuesday: home // e.g. color should be yellow
...
I want to change all Sunday's
color to blue and so on.
here is my code:
$('#calendar').fullCalendar({
header: {
left: 'prev',
center: 'title',
right: 'next'
},
defaultView: 'month',
eventLimit: true,
events: [
{% for event in events %}
{
title: "{{ event.title }}",
date: '{{ event.date|date:"Y-m-d" }}',
time: '{{ event.time }}',
display: 'background'
},
{% endfor %}
],
});