Anyone know how to sort the fullcalendar so latest dates i shown first
Below image show the dates en ascending order, but how to show in descending
The code i have tried with is as follows:
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,listMonth'
},
defaultDate: '2017-10-01',
defaultView: 'listMonth',
editable: true,
eventOrder : (x,y) => x.start > y.start? 1 : -1,
eventOrderStrict: true,
events: [
{
title: 'Delta',
start: '2017-10-11T10:30:00',
end: '2017-10-12T12:30:00',
displayOrder: 2,
},
{
title: 'Alpha',
start: '2017-10-13T11:30:00',
end: '2017-10-12T12:30:00',
displayOrder: 3,
},
{
title: 'Bravo',
start: '2017-10-12T12:30:00',
end: '2017-10-12T12:30:00',
displayOrder: 1,
},
{
title: 'Charlie',
start: '2017-10-12T09:30:00',
end: '2017-10-12T12:30:00',
displayOrder: 4,
}
]
});
});