The Scheduler component accepts a
resources property which is used to change the appearance of the events based on the provided configuration.
An event can have one or more resources assigned to it—for 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.
As a minimum configuration, you have to define the following fields:
field—The field name of the event that contains the resource value.
data—The resource data array.
valueField—The field name from the data that contains the value of the resource.
textField—The field name from the data that contains the text of the resource.
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
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.