SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a calendar list setup. My customer could like to give the appointments in the calendar view (by default green) a different color based on the category; much like the way Outlook does it. I found out that there are different CSS styles for the calender items, which are used when you use the overlay feature.

So I'm now looking for a way to link a certain category for an appointment to one of these CSS classes. I checked the html output, but it seems like custom fields like my category field aren't included in the output. I thought about using jQuery and a custom serverside service, but that's a lot of work and on top of that the ID isn't available in the HTML (okay, it's included in the hyperlink url, but that's ugly).

I couldn't think of options involving SPD or serverside trick, but perhaps someone here has got a good idea. Of course I know there are third party solutions; but since the ootb web part is 99% ok I'd rather not step out of the box when there's no need to.

share|improve this question
Looks like the same question was already asked recently:… – Andrey Markeev Apr 27 '11 at 12:27
up vote 1 down vote accepted

An option if you have less than 10 categories: create one view per category, using filters. Then apply the overlay technique to regroup all the views in one calendar.

share|improve this answer
Simple but effective, works great; thanks. – Jasper Apr 28 '11 at 13:10

You can look at Christophe's color coded calendar solution. Basically you have a calculated column generate some HTML and use his TexttoHTML script to force the browser to render it. It's really slick and works client side seamlessly.

share|improve this answer
Have you tested this with 2010? We had a similar solution and it does not work for 2010. For 2010 this works better :… – Shoban Apr 27 '11 at 13:18
We're on 2007, but I have seen people post on other boards it works for them. They may have rewritten the calculated columns to the 2010 classes though. – Eric Alexander Apr 27 '11 at 13:40
@Shoban: my solution also works on SP 2010 (see the instructions). The post on the orbitone site is good, but contains a couple errors. And Mike Smith's solution doesn't work for every configuration (for the record I have one that is similar to his but I never published it). – Christophe Apr 27 '11 at 14:02
Ah okay! Thanks. Will checkout :) – Shoban Apr 27 '11 at 16:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.