Event background color defined from an ressource
Hello,
I have an issue with setting the background color of an event according to the resources, I might be doing something wrong but I read the documentation and my code seems logic.
In the timeline view, the resources are correctly set with the event.
Settings the color directly in the event or globally works fine.
Here's my options :
calendar = new Calendar({
target: canva.value,
props: {
plugins: [TimeGrid, Interaction, List, RessourceTimeline],
options: {
view: 'timeGridWeek',
nowIndicator: true,
eventStartEditable: false,
eventDurationEditable: false,
dateClick: dateClickCallback,
eventClick: eventClickCallback,
headerToolbar: {
start: 'today prev,next',
center: 'title',
end: 'timeGridDay,timeGridWeek,listWeek,resourceTimelineWeek'
},
events: [
{
title: 'Test 1',
start: '2024-07-10T08:00:00',
end: '2024-07-10T10:00:00',
resourceIds: [0]
},
{
title: 'Test 2',
start: '2024-07-10T09:30:00',
end: '2024-07-10T13:50:00',
resourceIds: [1]
},
{
title: 'Test 3',
start: '2024-07-11T15:15:00',
end: '2024-07-11T17:45:00',
resourceIds: [0, 1]
}
],
resources: [
{
id: 0,
title: 'Lukas',
eventBackgroundColor: 'red'
},
{
id: 1,
title: 'Jhon',
eventBackgroundColor: 'green'
}
]
}
}
})
And the results :
Thanks for your work !
I have an update, it works now, I added the @event-calendar/resource-time-grid plugin and I got the colors. I leave this, I don't know if it's an issue or not.
I confirm that the problem exists. This should work without having to use @event-calendar/resource-time-grid. I will fix this in a future version. Thank you for reporting.
The problem should be fixed in Event Calendar v3.2.0. Please check.
I hope I can close this issue.