FullCalendar listMonth event order

I am implementing listMonth in fullCalendar. I want to invert the order and show the top events first, not the bottom. How should I do it?

+4
source share
1 answer

To go from:     Default time order       Revered Time Order

The only way to do this in the latest version (3.4.0) is to change the source code.

In particular, in line 6297 of an undetermined source there is a function

compareEventSegs: function(seg1, seg2) {...

To reverse the sort order of events, simply change the order of the parameters in seg1and seg2around:

compareEventSegs: function(seg2, seg1) {...

Similarly, for the source you are looking for compareEventSegs:function(t,e)and do the same.

Please note that this will affect ALL views.

, , .

+5

Source: https://habr.com/ru/post/1674793/


All Articles