I'm developing sharepoint hosted app that can fetch events from sharepoint list and put on fullcalendar monthly view. I have suceeded to fetch the events but all calendar events have the default color(blue). I want to assign different color based on the status type( a column in the list).(If it is granted ,it will be green. If it is rejected, it will be red). How can I achieve that ?
my calendar setup partially looks the following:
function CalendarSetup(eventArray) {
schedulecCalendar = $('#myCalendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: ''
},
theme: true,
defaultView: 'month',
selectable: true,
events: eventArray,
selectHelper: true,
height: 500,
rendering: true,
select: function (start, end, allDay) {
$('#txtDate').datepicker("setDate", new Date(start));
$(".collapse").collapse('show');
},
editable: true
}); }
eventArray is already fetched from sharpoint list.
Any tips/help would be apperciated.