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

Was wondering if someone has experience coloring a calendar event based on the value of a category. I have seen guides to do this via Sharepoint Designer but would like a way to do this through the Visual Studio 2010 project that is creating the list. Details or a link are most appreciated.


share|improve this question
up vote 2 down vote accepted

CSS, javascript & calculated columns should do the trick. Read the following posts:

share|improve this answer
Use the first link and make sure you follow their recommendations for adding color to a Sharepoint 2010 calendar (needs a difference script). Other than that this works like a charm – MikeC Oct 28 '11 at 3:31

One way to achieve this is through the calendar overlays feature. Create a view for each category. Then create a view that displays nothing (filter by date or something that excludes everything). Then add an overlay for each category view.

share|improve this answer
Here is one example of using the overlays programmatically:… – John Chapman Oct 24 '11 at 14:29

Try this article on how to create a color coded calendar by category using JS in SharePoint 2010-

share|improve this answer
Please try to provide more details to your answer, to make it more stand-alone from the link. The link may break before this page does :) – Robert Lindgren Aug 14 '13 at 7:41

The simplest way is to make the Category display in one of the calendar mapped fields and add a CSS stylesheet either via Content Editor web part (one-off) or a CustomAction/DelegateControl (reusable).

Provided a week or day view has subheadings displaying the category, a style that will be supported by most modern browsers is as follows:

[title*=Warning].ms-acal-item {
[title*=Critical].ms-acal-item {
share|improve this answer

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.