My interactive calendar is created using :
$('#calendar').fullCalendar({
height: 300,
//.............
events: jsonData,
month: firstMonth
})
I am looking to dynamically change the color of an event based on certain conditions for each value (item) in jsonData
. How can I achieve this?
I am unable to simply specify the colors like this:
eventSources: [
{
events: [
{
title : 'event1',
start : '2012-06-10'
}
],
backgroundColor: 'green',
textColor: 'yellow'
},
as it would require me to split jsonData
into two parts before passing it to the calendar. Instead, I am looking for a callback function where I can access each item and set the color for an event. Something similar to eventMouseover
.