Color Picker for Calendar Widget.

Dear People,   I'm trying to edit colours in my Calendar Widget. However all the forum questions so far date a few years back when the view layout was allot different. What im trying to do is giving Events inside the calendar a different color based on whether a particular boolean is true or false. So when Boolean A = True give color Red If Boolean B = True give color green, etc.   Is this at all possible and how would i go about doing this? The documentation doesnt really have the solution for me since im new to mendix.   Greeting    Michiel
2 answers

Hi Michiel,


I have answered this question in another forum post (


I think it would work for your use case too. In short you should add a “Color” Attribute to the Event Object. Then use an event listener to set the color if a certain condition is true. In my answer it was with enum values but you can just compare to a boolean.


Hi Michiel


I don’t have the actual change object activity anymore as I have just created it for that example a while ago. I just took one change object activity in my open active project.


This is what it should be like:

Select your event object (in this picture “kurs”) in the “Input” section and then change the “color” attribute (in this picture “Kursname”) to the hex color value that you want to give to the event object. Don’t forget to select “Commit: Yes” and “Refresh in Client: Yes”.