282
Views
2
Comments
Solved
[FullCalendar 2] Change Event Background Color
Question
fullcalendar-2
Web icon
Forge asset by João Grazina

Hello,


I am trying to change an event background color based on an attribute from the Events Entity (Priority Static Entity with 3 records).

How can I do this?


Thank you!

2022-05-25 10-40-45
Hugo Duarte
Solution

Hi João,


Since you have a backGround color in the event structure that you can set to anything:

If you have a static entity you can have something like in the print


Example:

If(LocalVariableType = Entities.Type.Type1, "rgba(255, 0, 0, 0.5)",
   If(LocalVariableType = Entities.Type.Type2, "rgba(0, 255, 0, 0.5)","rgba(255, 0, 0, 0.5)")
)


You can also have a switch, you can do it with a lot of alternatives.

Hope it helps.

UserImage.jpg
João Lopes

Hi Hugo,


That did it! Thank you very much!

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.