Issue 1629: Event Source Order
Status:  WontFix
Owner: ----
Closed:  Aug 2013
Reported by bhol...@snapappointments.com, Dec 3, 2012
Our application is adding and removing sources quite a bit (checkboxes/etc) and we have up to 30 sources being fed into our calendar. Upon refreshing, the event sources are "juggled" into a different order (horizontally) depending on how quickly the data was returned from the event source.

How do we keep everything on the calendar in order regardless of how quickly the data is returned? For example, if 3 calendars have events that start at the same time, a refresh could cause them to flip-flop at random. This becomes frustrating because with up to 30 calendars being displayed at once, it makes it that much more difficult to keep track of events!

We are probably missing something easy here...but I've scoured the web for days and ultimately gave up and came up with our own solution: to combine all of the feeds into a single ajax get, and then use ".fullCalendar('addEventSource',window.cal_source_<?=$i;?>)" in order (where the javascript variable is the applicable calendar within the JSON array.) Since the actual get already took place, this keeps everything executing in order. However, it presents a new issue -- the browser will lock up and stop responding (especially in Firefox) if there are too many events being rendered at once. Once it snaps out of it, everything is fine...but obviously this isn't going to work either. The progress bar also locks up since we are instantly removing and adding up to 30 sources...so it appears as if our system has crashed. Often a "stop script" message will pop up as well.

So obviously everything worked before because of the delay introduced by pulling in each feed one-by-one. Adding in a setTimeout to each "addEventSource" seemed to help in Chrome (although Chrome wasn't a major concern anyway)...but in Firefox the issue is still there regardless.

I'm not sure what to do -- is there some way to access the array of eventSources? I'd like to keep them in order and just go back to the old way of only fetching them as-needed.

It's a bummer when we just need to refresh a single calendar...but we can't without completely rearranging all of the events on the calendar.

There has to be a simple solution here I'm just missing. FYI, we use the agendaWeek view for pretty much everything.

Also, if there is no solution here, what is the best way to keep the event rendering under control so we aren't trying to cram too much into the pipe at once? Obviously setting a huge "setTimeout" on each "addEventSource" would probably do the trick...but that isn't ideal either since it's just guessing.
Aug 15, 2013
Project Member #1 adamrs...@gmail.com
newer version of fullcalendar have more consistent ordering, so the problem might be fixed, but if you want more control over the ordering, this issue is for you:  issue 364 
Status: WontFix