Thanks for the fast answer, but maybe my request was a bit vague.
The event rendering and event color is fine, we have a problem with the calendar cell background color, which is not refreshed, after the color was changed.
In our backend data object, we have e.g the business days of an area.
Simple example:
-
26.11.2024: non business day -> helper function returns false and calendar cell background is rendered #FF0000
-
When I now change the 26.11.2024 to a business day and reload the calendar
-
The onBeforeCellRender function is triggered, the helper function rerturns true, so the backColor property is changed to #00FF00
-
Visually the calendar backColor is still on color #FF0000
-
When I restart the complete application, the backColor is rendered correctly. Now I can do the same the other way round.
It feels like the backColor is cached, and not refreshed, even it was set to a new color. That’s why I mentioned the beforeCellRenderCaching property from scheduler component.
Calendar.onBeforeCellRender = args => {
if (this.IsBusinessCell(args.cell.start)) {
args.cell.properties.backColor = "#00FF00";
args.cell.properties.business = true;
args.cell.properties.disabled = false;
} else {
args.cell.properties.backColor = "#FF0000";
args.cell.properties.business = false;
args.cell.properties.disabled = true;
}
}