logo

FullCalendar

requires Scheduler lightning bolt

resources (as a function)

Tells the calendar to fetch the resources list by executing a function. The function is given a callback argument that should be called with an array of Resource Objects:

resources: function(callback) {

  somethingAsynchonous(function(resourceObjects) {
    callback(resourceObjects);
  });
}

This allows for any sort of asynchronous means of obtaining the resource list.

If refetchResourcesOnNavigate is set to true, the resources function will receive additional arguments. It will receive the start and end moments for the newly visible window of time as well as the calendar’s timezone:

refetchResourcesOnNavigate: true,
resources: function(callback, start, end, timezone) {

  somethingAsynchonous(start, end, timezone, function(resourceObjects) {
    callback(resourceObjects);
  });
}

These arguments are similar to what the events function receives, though in a different order.

This refetchResourcesOnNavigate behavior is present in v1.5.1 and later.