Support

Home Forums Events Calendar Add-on Any way of having different colours for events on a single calendar?

Any way of having different colours for events on a single calendar?

Posted: July 23, 2013 at 12:25 pm

Viewing 3 reply threads


Robert Aitken

July 23, 2013 at 12:25 pm

Having a tough time with this. I’ve tried making a “parent” category that doesn’t use a colour picker, but this just results in some default blue colour scheme( colour pickers from other categories are ignored ). Im hoping to find a solution that will be client friendly ie. possible through the Dashboard.

Calendar Settings:
Enable CSS for Categories – Yes
Use Colour Picker – No
Disable Categories – No


Josh

  • Support Staff

July 23, 2013 at 1:03 pm

Hi Robert,

The calendar will style each event according to its category’s color settings *if* each event is assigned to one category only. This is client configurable via the category settings. There’s a color picker in place that allows for selecting a background and text color.

If you’re looking to do something more than what the out of the box functionality allows for it does take some custom coding (CSS in this case). As an example, if you have several categories assigned to the same event and want to make one of the categories “win” when it comes to displaying a specific color, then you can set up some custom CSS rules based on the category names.

So as an example, if you set up some categories like this: red, orange, yellow, blue, green. These can be checked in the event editor by your client and each of the above categories can have pre-set CSS rules that you’ve added to a custom stylesheet like this:

.red,
.red a {
 color: #FFF!important;
 border-color: red!important;
 background-color: red!important;
}

.yellow,
.yellow a {
 color: #000!important;
 border-color: yellow!important;
 background-color: yellow!important;
}

/* and so on */

Please note that the color pickers feature in the category editor needs to be disabled for the CSS solution to work.


Robert Aitken

July 23, 2013 at 1:18 pm

Thanks for the quick response. This is very helpful.


Dean

July 24, 2013 at 4:40 am

Hi Robert,

Is this thread resolved now?

Thanks

Viewing 3 reply threads

The support post ‘Any way of having different colours for events on a single calendar?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso