Im using the Fullcalendar Control and implemented the eventOrder function as described - it works perfect, however it gets only called for events of same length. I would like to know how to customize the Control in order to get the eventOrder function called for all events (even events that span across a single day). I have a custom sort attribute pre-calculated.
Im using the Oracle Application Express Framework and the only way I have to put a custom sort attribute is to provide that into a CSS class.
Inside the eventOrder function which I will outline below you see how I have implemented it.
The calendar picture shows exactly where the error is: one event is spanned over 2 days and is not put below the event, in case the event is only for one day, the function gets called and the sort order works. ( I see it in the breakpoint)
Calendar with wrong sort order:
pOptions.eventOrder = function(a, b) {
var result = 0;
//if (a.id == '17399' || b.id == '17399')
// alert(a.title + ' vs ' + b.title);
if (parseInt(a.className[0]) > parseInt(b.className[0])) {
result = 1;
}
if (parseInt(a.className[0]) < parseInt(b.className[0])) {
result = -1;
}
return result;
};
The version of the FullCalendar seems to be 3.10.0