Resource Data Premium
How to get resources onto your calendar and how to manipulate resource data thereafter.
resources (as an array) Tells the calendar to display resources from an array input.resources (as a JSON feed) Tells the calendar to fetch the resource list from a remote script.resources (as a function) A custom function for programmatically generating raw Resources objects.Resource Parsing All of the techniques for specifying resources accept an array of raw objects.Resource Object The parsed form of a resource, with properties to read and methods to change it.Associating Events with Resources How to specify which resources your events are assigned to.refetchResourcesOnNavigate Whether to refetch and rerender resources when the user changes the date or view.initialResources An initial array of resources, which the calendar won't update if the value later changes.
Methods
Calendar::refetchResources Causes the resource data to be fetched and freshly rerendered.Calendar::getTopLevelResources A method that retrieves only top-level Resources.Calendar::getResources A method that retrieves all Resources, including children, as a single flat list.Calendar::getResourceById A method that retrieves a specific Resource Object in memory.Calendar::addResource Adds a new resource to the calendar after the initial resources have been displayed.Resource::getParent Returns the parent Resource of a child resource.Resource::getChildren Returns a list of a resource's child resources.Resource::getEvents Retrieves a list of Event Objects that are associated with the given resource.Resource::setProp Modifies any of the properties of a Resource Object.Resource::setExtendedProp Modifies a single property in an Resource Object's extendedProps hash.Resource::remove Programmatically removes a resource from the calendar.Resource::toPlainObject Serializes a Resource API Object to a plain object that would be fit for JSON.stringify.