I want to set a different colour for events that are in the past (so yesterday and back) and then have a different colour for future dates(today and dates in the future) i have code below however this does not work for future dates
events: {
url: 'load_Emp_Roster.php',
error: function() {
$('#script-warning').show();
},
success: function(data){
for(var i=0; i<data.length; i++){//The background color for past events
if(moment(data[i].start).isBefore(moment())){//If event time is in the past change the general event background & border color
data[i]["backgroundColor"]="#f44336";
data[i]["borderColor"]="#336600";
}
else{
data[i]["backgroundColor"]="#4CAF50";
data[i]["borderColor"]="#336600";
}
}
}
},