When I load the page with calendar, it shows me all events in default colour. Only if I click on event with Day 6 or above, it colors every event to pink one which I set in condition…
Probably I don’t understand how this feature suppose to work?
P.s. I’ve read about the opportunity with dynamic colors in DB, but don’t want to implement it
I have not used this plugin, but in the conditional This Calendar's current event refers to the last event which has been clicked. So if the clicked events day_number > 5, all the events will turn pink.
If there is a way to color in event colors dynamically, you’d find it on the Appearance tab.
sounds a bit too complicated in my case. Because I can use text data types from the DB table I’ve chosen for “type of events”
I show the events from the DB table “plan item” . For every plan item I have a specific “category”, which are stored in another DB table, many “plan items” can have same “category”.
So if I understand it correct, I have to go to each “plan item” and add color value to every item, rather than just add the color for the category…
Its quite a basic impementation. If you are worried about modifying existing entries you can do it in very few steps.
Create a Text field on the Category
Add the desired color to every category
Create an API workflow that takes a Plan as input, and just sets the plan’s color to its category’s color
Use the ‘Bulk’ functionality on the Data Tab to bulk modify all plans.
I would personally use an optionset as the datafield on the Category, and maintain all categories and their colours from the optionset.
in that case in Plan item I have to have field as text. I added color with data type option, but I can’t choose it later in calendar, only text is possible. Or I have to make a switch during API call?..
Thats annoying, not a big fan of pluigins that dont allow for a dynamic expressions.
Seems like you will have to keep a text field on the Plan type.
At this point it might be best to have a text field on the Category type as well. Option sets wouldnt give a big benefit if they cannot be linked. And with option sets you would need to redeploy the app every time you want to change the color. Text field on the database would propagate as soon as you make the change, no need to redeploy.