0

I've set up my events sources to pull from two different endpoints. One of these endpoints is heavy and happens to take two seconds longer than the other.

My calendar appears to wait until both sources are loaded before populating the calendar.

Q: is it possible to populate the calendar with the first data source while waiting for the second to finish?

$('#calendar').fullCalendar({
    eventSources: [
        loadQuickEvents,
        loadSlowEvents'
    ]
});

function loadQuickEvents (start, end, timezone, callback) {
    // execute xhr, on success trigger callback
    ...
    callback ()
}

function loadSlowEvents (start, end, timezone, callback) {
    // execute xhr, on success trigger callback
    ...
    callback ()
}
4

0 回答 0