Custom event colors in Full Calendar plugin

I’m building a calendar app, using the Full Calendar plugin. For the event color, I don’t want it to be static, but rather tied to an event Category. I have an EventCategory table with Name and Color (text field with HEX code), and an CalendarEvent table with Category as a type of EventCategory. But I want to pull the Color from the attached EventCategory.

“Use a dynamic color for each event” only looks in the direct data’s source (not any connected fields), and only for Text entry. So can I create a Color field that when the data for the event is pulled, it formulaically fills in the Color field based on the corresponding Color field of the connected Category record?

So if I don’t choose dynamic color, it gives the option to pick the event’s category’s color. But it only changes their color from the default when they are clicked (which is contrary to how the choices are labeled).

The correct behavior I get is when I choose dynamic color and set the field to a text field (called Color), but is there a way to automatically update that Color field to match the Category’s color field? For example, if the Category of an event is changed, the color updates; or, if the Category’s color is changed, the event pulls the changed color.

1 Like

Hi @jfwhite, did you ever get a resolve to this? I posted the same predicament

Hey,

I already added this on the Ideaboard :grinning: :computer:

I always wonder why not set the color on the event?

My calendar plugin allows for up to 6 dynamic even type/color combos but I don’t know why I even added it anymore.

For having the option to have preset colors in option sets, it’s more easy to change colors in the future

1 Like

Well, you can definitely do this with the plugin I released for free today!

Someone should really work on the docs tho :rofl:

1 Like

Great, thanks, @jared.gibb.

The thing my app only needs this little change (adding an expression instead of a dropdown with options).

Was this ever figured out? I want to have a different colour for each team members calendar event.

Depends on what calendar you’re pluggin you’re using

I have the coloring working and wanted to update this thread with the solution;

First, in your Diary Datatype, add ‘Colour’

Then in the Calendar’s inspector, set the Data source to Search for Diary and check ‘Use a dynamic color for each event’ and choose the Event name you just created, ie. color. Now the Calendar to ‘talking to’ your Database.

So how does it know what colour to choose? My users each have a ‘Role’ so I have assigned a colour to each role via option sets;

Now, when I create a Calendar event the colour is the ‘Role’s color’, or in my case I am setting it to the teamMember’s value’s Role color because I have a team member Datatype.

2 Likes