Resources

The Scheduler component accepts a resources property which is used to change the appearance of the events based on the provided configuration.

Getting Started

An event can have one or more resources assigned to itfor example, a meeting room or a guest list. For more information on configuring the Scheduler to display each resource as a sub-view, refer to the article on grouping.

Each resource is described by a SchedulerResource object that contains all possible values for it. To define the resources, set the resources property.

As a minimum configuration, you have to define the following fields:

  • fieldThe field name of the event that contains the resource value.
  • dataThe resource data array.
  • valueFieldThe field name from the data that contains the value of the resource.
  • textFieldThe field name from the data that contains the text of the resource.

Using Visual Separation

One of the most useful use cases for the resources property is to visually separate the events based on their field values.

The following example demonstrates how to color the events based on their roomId field.

Example
View Source
Edit In Stackblitz  
Change Theme:

Setting Multiple Resources

The resources property accepts a collection of resources which means that you can provide two or more resources. If you provide multiple resources, the event will acquire the color of the first matched resource.

The following example is based on the previous example and provides two resources.

Example
View Source
Edit In Stackblitz  
Change Theme:

In this article

Not finding the help you need?