Associating Events with Resources Premium
An Event becomes associated with a resource when its resourceId property matches one of the Resource Object’s id fields:
const calendar = new Calendar(calendarEl, {
resources: [
{
id: 'a',
title: 'Room A'
}
],
events: [
{
id: '1',
resourceId: 'a',
title: 'Meeting',
start: '2015-02-14'
}
]
}); Multiple Resources#
It is also possible to associate an event with multiple resources using the resourceIds property, which is an array:
const calendar = new Calendar(calendarEl, {
resources: [
{
id: 'a',
title: 'Room A'
},
{
id: 'b',
title: 'Room B'
}
],
events: [
{
id: '1',
resourceIds: ['a', 'b'],
title: 'Meeting',
start: '2015-02-14'
}
]
}); The event renders once per resource. Each rendering’s render hooks receive the resource it’s rendered under as info.resource.