Dynamic Calendar Event Colours |
9/15/2025 13:19:16 | |
PHPRunner Tips and Tricks | ||
C
Chris Whitehead author
Building on the new calendar events which Sergey added and described here Customise Calendar I've managed to change the event colours on the fly. Selecting the types from an event_types table. In the Calendar Before Display event, add this php. ### build the css for the types which had just id, type_details, type_bg_colour, type_text_colour The in the Create Calendar event, add this Javascript. // Get the events data |
||
![]() |
Sergey Kornilov admin 9/15/2025 |
Thank you for sharing, this is a really cool trick! |
|
C
|
Chris Whitehead author 9/16/2025 |
I noticed there's a console error when adding and needs a little more tweaking so the calendar refreshes after the model closes but it's a start. |
|