I have a problem with my Fullcalendar ( http://arshaw.com/fullcalendar/ ) events output. Now I can get a full output of all events, but I want to make some change to it so it can display the events in an order that defined in a array.
For example, I want the events to be sorted by title following the order {“Jack”, “Tom”, “Ben”}.
But sometimes there may only be Jack and Ben’s events so I would like my display still follow the array order but skip the ones that are missing.
I searched around and the only way I can find is to make some change to the fullcalendar.js function segCmp(a, b) .
I am just asking if there is any other solution for this issue, or this is the only way to do it?
Thank you
You would indeed need to change segCmp(a, b). That shouldn’t be too bad though, the sliceSegs function below it tells you what the parameters are you need to work with to generate the sort order you’re after. a.event.title and b.event.title will give you the titles of the segments.