Customize the SharePoint Calendar Colors

I shared a post a while ago on how to create a color coded calendar in SharePoint. This is a no code (for real!) solution, and I’ve received some great feedback from it. One area I want to focus on are the colors.

Let’s go from blah

To, well, more colorful, not sure if I’d call this awesome or not (my color matching skills are lacking)

If you haven’t noticed, there are some colors which are really close to each other, and could easily be mistaken for each other. It’s rather frustrating. Also, they’re all pastels, which is nice but what if I want it to pop on the page?

You can setup a custom style sheet on your calendar page to override the colors. Unfortunately, this will not change the colors at the time you setup the calendars. To keep your colors straight, here’s the colors, and their associated values:

Light Yellow, #fef8d6, Color #1
Light Green, #d0ffbc, Color #2
Orange, #feebcd, Color #3
Light Turquoise, #c8f0ff, Color #4
Pink, #ffc8e8, Color #5
Light Blue, #bee5ff, Color #6
Ice Blue, #e0e8f2, Color #7
Ice Blue, #d9dde1, Color #8
White, #f2f2f2, Color #9

See the close similarities? 1 and 3; 4 and 6; 7, 8 and 9. You only have 5 unique colors to work with.

As you create your color coded calendar, make note of the color #s you’re using, this will be important when creating the new color scheme. And since we’re talking about color schemes, I highly recommend using a comfortable color scheme. You don’t want your calendar to hurt your users. You may only want to change a few colors instead of the entire collection. There are a lot of color schemes and combos online, if you want to create your own, check out http://colorexplorer.com/. Take some time and figure out your ideal color scheme.

Now that you have your colors, let’s get started! First thing you want to do is follow my other post and make your color coded calendar, click here to open the post. Your end result should be a spread of drab pastel colors, like my first image on this post.

Okay, now that you have your color coded calendar, let’s change some colors! You don’t have to change every color in the list, or you may want to. Up to you. I’m going to change colors 3, 4, 8 and 9, and use some real colors that pop.

How? Magical CSS classes:

.ms-acal-color# {
 BACKGROUND-COLOR: #xxxxxx
}
.ms-acal-selcolor# {
 BACKGROUND-COLOR: #xxxxxx
}
.ms-acal-apanel-color# {
 BORDER-COLOR: #xxxxxx;
 BACKGROUND-COLOR: #xxxxxx;
}

The above 3 classes of styles represent one color. The first class is the color you see when the page loads, and you haven’t clicked on the item. The second is the selected color when you hover on it. The third class is the color in the legend, on the left of the calendar view.

See at the end of the class name, before the {, is a #. This is just a place holder, you’ll want to swap this out with the color above you want to change. For example, if you want to change color 4, you’d update your CSS like:

.ms-acal-color4, .ms-acal-selcolor4, and .ms-acal-apanel-color4

You can copy and paste the CSS as many times as you need, for numbers 1 through 9. Within each section you’ll see BACKGROUND-COLOR: #xxxxxx, and in the last CSS you’ll see BORDER-COLOR :#xxxxxx as well. This is where your new color scheme comes into play.

I’m going  use this neat color scheme I quickly found:

Source: CreativeColor Schemes

Any scheme you find you’ll want to find the HTML, hexidecimal, or CSS value, for your colors (naming varies depending on the site you get it from). It’ll be a 6 character code, usually starting with #. Take the above CSS classes and create your new CSS classes using the colors your picked for your previously made calendar, and specify your own color palette. Here’s what mine will look like:

.ms-acal-color3{
 BACKGROUND-COLOR: #C0362C
}

.ms-acal-selcolor3{
 BACKGROUND-COLOR: #C0362C
}

.ms-acal-apanel-color3{
 BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #C0362C;
}

.ms-acal-color4{
 BACKGROUND-COLOR: #816C5B
}

.ms-acal-selcolor4{
 BACKGROUND-COLOR: #816C5B
}

.ms-acal-apanel-color4{
 BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #816C5B;
}

.ms-acal-color8{
 BACKGROUND-COLOR: #668D3C
}

.ms-acal-selcolor8{
 BACKGROUND-COLOR: #668D3C
}

.ms-acal-apanel-color8{
 BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #668D3C;
}

.ms-acal-color9{
 BACKGROUND-COLOR: #007996
}

.ms-acal-selcolor9{
 BACKGROUND-COLOR: #007996
}

.ms-acal-apanel-color9{
 BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #007996;
}

For the border color, I decided to go with a grey. Once you have your CSS together, let’s get it into SharePoint!

Browse to your color coded calendar.

  • Click Site Actions, then Edit Page. This will switch the page into edit mode.
  • Click Add a Web Part above the calendar.
  • Select Forms in the Categories from the top left, then select HTML Form Web part. Click Add
  • Hover over the web part and click on the web part menu, on the right
  • The task pane will appear on the far right. Click Source Editor.
  • Delete what’s in there now, and then type in:
    <style type="text/css">
  • Paste in your CSS.
  • Type in at the bottom of the page
    </style>
  • You should see something similar to
  • Click Save.
  • You’ll see your new colors appear!!
  • My text is hard to read. Fortunately from here I can use the full arsenal of CSS and change font colors, sizes, spacing, etc.
  • To change the font color, add the following for each color number you want to change (#ffffff is white, you could use any color you want here as well.)
    .ms-acal-color3 div, .ms-acal-color3 div a, .ms-acal-apanel-color3 SPAN {color: #ffffff !important}
  • Click OK in the task pane to close it. Click Stop Editing in the ribbon to stop page editing.

And here we have it!


You can also modify the default light green item by adding these CSS classes. However, if you do, make sure to put it at the top of your CSS text, also, in my case here, any colors not using a new color scheme, like my pink PTO, will be changed to whatever color you put here.

.ms-acal-item {
 BORDER: #xxxxxx; BACKGROUND-COLOR: #xxxxxx
}
.ms-acal-default-hover {
 BORDER: #xxxxxx; BACKGROUND-COLOR: #xxxxxx
}
.ms-acal-apanel-item {
 BORDER: #xxxxxx; BACKGROUND-COLOR: #xxxxxx
}

And if you want to change the default font color:

.ms-acal-item div, .ms-acal-item div a, .ms-acal-apanel-item SPAN
{ color: #xxxxxx !important}

Happy SharePointing!

Advertisements

190 thoughts on “Customize the SharePoint Calendar Colors

Add yours

    1. Unfortunately it appears the 10 calendar limit is an out of the box limitation. You might be able to via custom code, if it’ll let you override it, but I’d question performance at that point. More calendars the slower it may perform.

      Like

      1. Great solution! I tried it and it worked. Quick question though, all items past the sixth category seem to take on the color of the first category. Am I doing something wrong?

        Like

  1. Hi David,

    Any ideas whether you can update the color dropdown names on the Calendar Overlay setup screen (_layouts/AggregationCustomize.aspx)?

    These don\’t appear to update when you over ride the CSS from what I can tell.

    Like

    1. Unfortunately there isn’t an easy way to do this. I make note of that, and provide the list of existing colors. You should make a map of the old color to your new color for your reference.

      It would take either a custom solution or some serious Javascript to override the options.

      Like

      1. That’s what I had assumed too. I guess it would be relatively easy to update with some jQuery. It’s probably not worth it though.

        Its funny how there’s inconsistencies like this throughout SharePoint. For styles in the ribbon dropdowns you can easily customize the title that appears using the “-ms-name” property. You would think this would be a perfect opportunity to do something similar.

        Instead it’s based off themes. In my eyes you wouldn’t usually want the color overlays to change to match the theme, but I guess that depends on how you are using themes.

        Like

  2. Thanks David, enjoyed the solution. Any way to change the color for each of the specific views that are displayed in the “Calendars in View” section so that when a user selects one of them, then don’t get the plain, uncolored calendar view?

    Like

      1. Making some headway thanks…I’ll let you know when I’ve ironed out a few more wrinkles. In the meantime, have you an equally impressive solution for removing Sat/Sun from the display? Wasted, high-rent real estate!

        Like

  3. David, this code below seems to work just fine. I have a total of 9 calendar views all displaying on one “master” calendar view via calendar overlay. The one below has its event displaying in #e34363 on the master calendar. When I now select that view from the “Calendars in View” section, it now displays the events in the individual view in the same color as the master calendar view. Plus it hides the list name (changes background, border and font) to the default #EEECEA so it doesn’t appear under “Calendars in View”. Finally, I added the “master” calendar view to each individual view for ease of navigation.

    I am not a coder, but it’s fun to experiment! Thanks for your effort with this.

    .ms-acal-item{
    BACKGROUND-COLOR: #e34363
    }

    .ms-acal-item a{
    BACKGROUND-COLOR: #e34363
    }

    .ms-acal-apanel-item{
    BORDER-COLOR: #EEECEA; BACKGROUND-COLOR: #EEECEA;
    }

    .ms-acal-item div, .ms-acal-item div a,.ms-acal-apanel-item SPAN {color: #ffffff !important}

    .ms-acal-apanel-item span {
    color: #EEECEA !important;}

    .ms-acal-color1{
    BACKGROUND-COLOR: #5F04B4
    }

    .ms-acal-apanel-color1{
    BORDER-COLOR: #5F04B4; BACKGROUND-COLOR: #5F04B4;
    }

    Like

  4. David,

    Wonderful posts, thank you so very much!

    I am having some difficulty getting the colors to implement. I have the overlayed calendar all set per your previous post, but when I follow the directions in this post, I am not getting any results. I have double checked that my numbers are correct and CSS mimics yours with my own #s and hex. Is there anything else that I may have done wrong or may be preventing the colors from being modified?

    Thanks!

    Like

  5. I followed your instructions and added the CSS code to the calendar view, but can’t seem to get the colors to change.

    Do these instructions work equally on Foundation and Server? I have access to both, but need this work work specifically on Foundation.

    Like

  6. Hi David i was trying this but after adding the Web part, forms, HTML from web part, something odd happened. I can’t see the edit ribbon for the calendar nither add a new event nor any other acction it is just disable. i’m not sure what the problem is and how to solve it, could you please help me.

    Like

    1. Uh oh. That doesn’t sound good. What you can do is in the address bar, at the end of the URL, if there are other query string variables (i.e. ?var=val&var=val) add &content=1. If you don’t see query strings, i.e. pagename.aspx, add ?contents=1. This will go to a web part maintenance page where you can remove your web parts.

      After you fix it, feel free to email me your CSS and I’ll confirm it’s clean, david at lozzi dot net.

      Like

      1. The same thing happened with my attempt. Until you click just above the calendar in line with the arrows/ months/ year then the ribbon appears…

        Super code btw – have been trying for a few days now to colour code… just a shame we can’t add more choices – thanks!

        Like

    1. Hmmm… can you send me your CSS and I’ll take a look? Also, a screen shot of your page would help (to confirm the calendar is configured) Email me david at lozzi dot net or reply and paste it in.

      Like

  7. Hi David,
    Thanks a lot for this. It really helped. And for others not seeing the colour change, Davids example code only changed options 3,4,8 & 9. Then make sure you refresh your view properly. The change in colours do happen.
    However I have another question David I hope you can answer (and clearly form it you will tell I am not a coder but a cut and paster).
    When I pull the consolidated calendar in via a webpart to another page the colours don’t ‘come with it’. Do I need to replicate the CSS within the page that will now contain the Calendar webpart?
    Many Thanks

    Like

    1. Hi Dave,
      I’m glad I could help. And yes, you need to include the CSS on any page you’re creating the calendar on. Alternatively, you could keep the CSS in your master page or alternate CSS file, which would make the colors apply across your entire site. If this is of interest, let me know, I’ll walk through how to.
      Thanks,
      David

      Like

      1. Hi David,
        This does not work when you drop the calendar as a web part onto a page. You’re not able to add overlays when editing the web part and in any case all the events are marked with the same class (ms-acal-item) in the HTML no matter which overlay they are from so a css class would not help. Any ideas?
        Thanks,
        Darren

        Like

  8. HI David, So I forgot the last step, to add , and now my main calendar is gone. I cannot figure out how to get back to edit the web part. Can you be of any help?

    Like

    1. Hi Bill, Sure thing. I think the comment missed something ” I forgot the last step, to add , and now…”. Add what exactly? You can view all web parts on the page by going to Site Actions > Edit Page. If a web part is hidden, it should should up in this view. Let me know. – David

      Like

      1. Thanks for getting back to me so soon. I meant to say that I forgot to put in at the end. Now the when I click calendar in the navigation a blank page shows up. I can click the color coded views to see them but the combined view is gone. And when I click Site Actions on the blank page, it wont give me the drop down list any longer. Very strange! Any other ideas?

        Like

      2. ok, I was able to modify the code through designer and the calendar has come back. Sorry to be a pain, as you can probably tell, I am new to this. The only issue I have now, is that all calendar items were duplicated. One of each in white and their respective colors.

        Like

      3. Hi David – I am having the same problem as Bill did. The problem occurred because I was not following directions properly and I only typed into the web part html box before I hit save and nothing else.

        Now I cannot go to Site Actions>Edit page to remove the web part, because the Site Actions menu no longer drops down. In fact, none of the drop downs on the page work anymore, including ‘Support’ and ‘Tools’.

        I have checked in SharePoint Designer like Bill explained, but I can’t figure out what he did to fix it. Can you tell me where to go in SharePoint Designer to just remove this new web part and put my calendar back to normal?

        Thanks so much for your help!

        Like

    2. Hi Bill, you’re seeing duplicates because the base view has everything still in it. You’ll need to filter out the base view to exclude the items which are in other views.

      Like

  9. Hi David, I created the calendar overlay using your instructions (thank you) and assigned colors to various calendars. The calendar overlay displays the event entries with the colors assigned to those calendars, but the shortcut links (legend) on the left navi pane are not color coded, they are all clear. Do you know why the legend shortcut links are not color coded similar to the colors assigned to the associated calendars? Thank you!

    Like

    1. Hi Nicole. The left panel is handled by the ms-acal-apanel… class. Confirm that these are correct. If you want, you can email me your CSS and I’ll take a look, david at lozzi dot net.

      Like

  10. Hello David, thanks for this help! I hate identifying sharepoint CSS classes, so you’ve saved me (and a lot of people!) a lot of time.
    I’ve implemented your solution, and it is only half-working for me. The left-nav that shows each of the calendars in the view is correctly colour coded, but the actual calendar entries are not. I can only assume it’s because there is a delay in rendering the calendar items – by which I mean, the ‘body’ of the calendar is rendered a little bit before all the events appear. They do correctly change colour when an event is clicked, though!
    I’ve tried moving the css to a jQuery function that’s called on document ready, but still no joy – a sample alert shows this being called before the calendar events are rendered.
    Any ideas?

    Like

    1. Hi there. It’s not necessarily a page load issue, as CSS is available almost immediately on the page, and since the events are loading a little later, that’s even better.

      Since the color appears on click, you have some classes in place. Possibly the issue is around a typo? If you want, email me your CSS and I can take a look, david.lozzi at slalom dot com.

      Thanks,

      Like

  11. Hi David, thanks for all your info. I’ve got it half working. I started with my calendar. Created overlay’s for each view i want to show in a different color. Then I created a calendar webpart on my main page, here I did your source code with my colors in the html form above that calendar web part. It works, though I don’t have a legend. My problem is, when you go to the calendar I can’t get my code changed there. So it might be one color on my web part, but then the calendar page had a different color. I don’t see where you can add a webpart to the calendar page. I also tried editing the calendars default form web parts, but that did nothing. Please help, where am I going wrong?

    Like

    1. Hi Tammy,

      A web part and the primary calendar view have to be setup separately. You should be able to setup the same layers and color codes so they match. The web part does not have a legend, unfortunately.

      Editing the calendar page should be accessible via the Site Actions menu, as noted in the post. Are you able to see the Site Actions button?

      Like

      1. It’s the primary calendar view that I’m having a problem with. I can’t find a place that I should place the html code.

        Like

      2. You have to add the HTML Form Web part to the page, preferably below the calendar web part. The first step in doing so is clicking Site Actions > Edit Page. Do you see this option?

        Like

      3. I’m not sure how I could have missed that yesterday. It had only come up as a list. Thank you very much for your help. Now I’m trying to figure out how to change the text color. I need to make some white and some black. Is this just a one line html for each of my nine colors, or do I need to add 3 more lines per color? And if you could send me the code it would need to be. Currently I have for this for one color. .ms-acal-color1{ BACKGROUND-COLOR: #8B0000 } .ms-acal-selcolor1{ BACKGROUND-COLOR: #8B0000 } .ms-acal-apanel-color1{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #8B0000; } Sorry, I’m not a coder. Thanks

        Like

      4. Hi Tammy,

        I’m glad this is working out for you. The text colors can be changed, note the last couple of lines in the post, I stuck them in there at the end. Let me know.

        Like

      5. Thanks again David, you rock. Ok, I added the text color line and it changed it for all the colors. Which works ok, but what should I do if I want one or two of the colors to have a different text? Where would I put that code and would I need to change the other one line of text code?

        Like

      6. David, Just wondering if you were able to find out how I would write my code if I want the text of ONE particular calendar item to be black text instead of white?

        Like

      7. hi Tammy,

        Sorry about that, since I replied, it’s been a rather busy few days. You want to change the font color of one item, not of a single overlay calendar?

        Like

      8. Correct, I have a mixture of dark and light colors, the white text color looks good with almost all, but I have one lighter background that needs to have a dark text. I did notice that the html only changes the web part, how would I actually change it in the pages, so when I create the overlay, I can select the new color options, rather than the standard on sp? When I display it on the page, it’s the new color choices, it is just when I’m creating the overlay I have the old options.

        Like

      9. So you have a light color where you want a dark color. Try adding this to modify the font color:

        .ms-acal-colorX .ms-acal-sdiv, .ms-acal-colorX .ms-acal-sdiv a{
        color: #xxxxxx !important
        }
        .ms-acal-apanel-colorX SPAN{
        color: #xxxxxx !important
        }

        if this works, I’ll update my post.

        Like

      10. I tried (replacing the X with 5 for color 5), I was able to get the one light background have black text, but it does not show up as black text in the Legend. I also tried this for a second line color that also was light and I just copied and pasted the code, but changed the 5 to a 6. It didn’t change the text for my color6.

        Like

      11. I thought I did post the second line, my code looks like this: .ms-acal-color1{ BACKGROUND-COLOR: #8B0000 } .ms-acal-selcolor1{ BACKGROUND-COLOR: #8B0000 } .ms-acal-apanel-color1{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #8B0000; } .ms-acal-item div, .ms-acal-item div a, .ms-acal-apanel-item SPAN { color: #FFFFFF !important} .ms-acal-color2{ BACKGROUND-COLOR: #006400 } .ms-acal-selcolor2{ BACKGROUND-COLOR: #006400 } .ms-acal-apanel-color2{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #006400; } .ms-acal-color3{ BACKGROUND-COLOR: #0000CD } .ms-acal-selcolor3{ BACKGROUND-COLOR: #0000CD } .ms-acal-apanel-color3{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #0000CD; } .ms-acal-color4{ BACKGROUND-COLOR: #B0C4DE } .ms-acal-selcolor4{ BACKGROUND-COLOR: #B0C4DE } .ms-acal-apanel-color4{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #B0C4DE; } .ms-acal-color5{ BACKGROUND-COLOR: #ADFF2F } .ms-acal-selcolor5{ BACKGROUND-COLOR: #ADFF2F } .ms-acal-apanel-color5{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #ADFF2F } .ms-acal-color5 .ms-acal-sdiv, .ms-acal-color5 .ms-acal-sdiv a{ color: #000000 !important} .ms-acal-apanel-color5 SPAN{color5: #000000 !important } .ms-acal-color6{ BACKGROUND-COLOR: #7CFC00 } .ms-acal-selcolor6{ BACKGROUND-COLOR: #7CFC00 } .ms-acal-apanel-color6{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #7CFC00; } .ms-acal-color6 .ms-acal-sdiv, .ms-acal-color6 .ms-acal-sdiv a{ color: #000000 !important} .ms-acal-apanel-color6 SPAN{ color6: #000000 !important } .ms-acal-color7{ BACKGROUND-COLOR: #4169E1 } .ms-acal-selcolor7{ BACKGROUND-COLOR: #4169E1 } .ms-acal-apanel-color7{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #4169E1; } .ms-acal-color8{ BACKGROUND-COLOR: #BC8F8F } .ms-acal-selcolor8{ BACKGROUND-COLOR: #BC8F8F } .ms-acal-apanel-color8{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #BC8F8F; } .ms-acal-color9{ BACKGROUND-COLOR: #DEB887 } .ms-acal-selcolor9{ BACKGROUND-COLOR: #DEB887 } .ms-acal-apanel-color9{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #DEB887; }

        Like

      12. My test calendar doesn’t have as many overlays as yours, but working with 2, I was able to change colors using your CSS. There was one type in your code, search for { color5:, should be just { color:.

        I also moved the default text color CSS, .ms-acal-item div, .ms-acal-item div a, .ms-acal-apanel-item SPAN, to the top of the file.

        Let me know if that helps.

        Like

      13. David, I’m sorry for not knowing coding. I know this is supposed to be simple. How and where did you move the default text color CSS? I thought the 5 after the color was the number of the color of text I was trying to change. I’ll remove the 5, but if you could let me know about the default text. Thanks so much, Tammy

        Like

      14. Just to clarify,

        I moved from line 4 to top
        .ms-acal-item div, .ms-acal-item div a, .ms-acal-apanel-item SPAN { color: #FFFFFF !important}

        And this line
        .ms-acal-apanel-color5 SPAN{color5: #000000 !important }

        has a type in the style def, color5: #000000, should just be color: #000000.

        Let me know if that works.

        Like

      15. David, I was able to get it to work and added it to each line I wanted to change the color of text for. The weird thing was, when I took the 5 off of {color5: it fixed my problem in the legend, but then the event name was in the new color, but the time was in a different color, but that was not the case in the other line. The code was the same for each, but the other happens to match with the time color. If that makes any sense.

        Like

  12. Hi David!
    I found your site to be very helpful. I’ve been working on Conference Room Availability page that contains 6 individual conference room calendars (they are shown in a small scale on the right side of the screen) and then on the left side of the screen (the larger portion of the screen) I have the main calendar showing all of the reservations (an overlay calendar). Anyway I created the 6 individual calendars, the overlay calendar and applied the colors with no problems (thanks to your wonderful post). But I do have an issue where the colors from the 6 individual calendars are not coming through on their webparts on the Conference Room Availability page, however, if I click on the individual calendar I can see the colors on the actual calendar page. Now I went in to the webparts on each of them and made sure the view was set to Calendar, but that didn’t work. Am I overlooking something??? Any help would be really appreciated!!!

    Like

    1. Hi,

      I’m glad my post has been helpful. I’m not sure what you’re looking at exactly. Could you send me a screen shot of the page? That may help clear things up. You can email me at david.lozzi at slalom.com. Thanks.

      Like

  13. Hi David – This was super helpful! My question is, how do I get the legend to show up on each individual view if you click through from the Calendar Overlay?

    Like

    1. Hi Jennifer,

      I’m glad my post was helpful. Unfortunately the overlay feature is not ‘movable’, you have to manually configure it per page you want to use it on. It’s rather annoying if you have lots of pages and views. HTH

      Like

    2. I lied, it is movable. Well, what you need to do first is create the overlays on the list’s view, not in a web part, but navigate to the list and add overlays there. Then, when you add a web part, you can modify it to select a view, select that view with the overlays and that should carry over the same settings. You will need to reapply the color changing CSS to the new page however. HTH

      Like

      1. Oh my goodness, my brain hurts! I think I need to draw an org chart to help me keep it all straight! Thanks for looking into this. I’ll try to play around with that tomorrow.

        Like

      2. I’m agreeing with Jennifer. My brain hurts. So I ended up finding a js for color calendars that have the ability to select and deselect overlays on the calendar page. My problem is the html (css) that we came up with for my calendar (no longer works for my web part on the main page) Any ideas?

        Like

      3. Hi Tammy,

        I’m not sure what the JS script does to the calendars, and why the CSS isn’t working anymore. I’m assuming this is on the same page as the JS script? Can you point me to the JS you’re using?

        Like

  14. Hi David. Very interesting! But what if I wanted to change the vertical lines running through the calendar to be different from the background of the inside calendar…I’ve changed just about every other color BUT this border-color. – rootdiv to vcont to ms-acal-header. I apologize if this is too off-topic! I enjoy your site.

    Like

  15. Hi David,
    Thanks heaps for your work on calendar views and customising colours. One thing that I have noticed is that I no longer have the calendar tools ribbon at the top of the master view. It is available on each overlay view however. Is there a way to have that back?

    Cheers

    Josh

    Like

      1. Hi David,
        In the default view no it still does not display. I can select an individual calendar view and it displays as normal

        Like

  16. David,
    I have the same problem with my calendar. But if I click somewhere within the calendar or just above the ribbon appears. I was just told this was a drawback of using overlays. Is that not correct?

    Like

    1. Hi Tammy,
      You are correct I just tried this myself, thanks for the tip. David I have sent you my CSS, lets see if you can duplicate it or find the error.

      Cheers
      Josh

      Like

  17. David, Thanks for helping so many of us with this issue. I’m having a problem that occurs after I click the Source Editor button, paste in my CSS code, and then click Save. After that the color changes do appear in the legend on the left of the calendar, but the actual calendar disappears (the boxes with the days of the month, etc.) Also my ability to access any other controls on the page goes away. All of the buttons and menu choices are unresponsive (including the Stop Editing button, all other controls at the top of the page, the drop down menu to get to the Source Editor, etc). Do you think my CSS is invalid? I basically did a copy and paste from your example with the only changes being the color numbers.

    Like

  18. Hi David,

    Any ideas on how I could go about changing the color of the calendar itself? So the background color of the number of the day of the month.

    Like

  19. David,

    I’ve customized my calendar using the example in your blog post. It looks wonderful. Thank you!

    Now I’m wondering if there’s a way to display my color-coded calendar on my site’s home page. When I add the calendar to my home page, it displays in the default “blah” colors and when I add the CSS web part to the page, it changes the colors but calendar items aren’t categorized so as a result, they don’t display properly. In other words, is it possible to add the calendar (along with its views and overlays) to a site’s home page?

    Thanks,

    Rina

    Like

  20. I don’t know if its just my environment but when you add a HTML Form Web Part or a Content editor web part to the main calendar page, the page no longer has the calendar tools at the top or even the ability to change the calendar view in the breadcrumb. To bring up the calendar tools, all I need to do is click on the calendar. Previously, it would just show up when the page loaded by default. I’m really concerned about the “view arrow” disappearing in the breadcrumb to change the view. Is this happening for you?

    Otherwise, your calendar coloring techniques/coding worked perfectly for me.

    Thank You

    Like

    1. Hi James,

      I’m not sure, I have had, and others reported it as well, that you do have to click on the calendar to get the ribbon to appear. Not sure about the view switcher. I’ll have to check it out.

      Thanks,
      David

      Like

  21. .ms-acal-color1{
    BACKGROUND-COLOR: #9F3
    }
    .ms-acal-selcolor1{
    BACKGROUND-COLOR: #9F3
    }
    .ms-acal-apanel-color1{
    BORDER-COLOR: #9F3; BACKGROUND-COLOR: #9F3;
    }
    .ms-acal-color2{
    BACKGROUND-COLOR: #00AEEF
    }
    .ms-acal-selcolor2{
    BACKGROUND-COLOR: #00AEEF
    }
    .ms-acal-apanel-color2{
    BORDER-COLOR: #00AEEF; BACKGROUND-COLOR: #00AEEF;
    }
    .ms-acal-color8{
    BACKGROUND-COLOR: #Hd266
    }
    .ms-acal-selcolor8{
    BACKGROUND-COLOR: #Hd266
    }
    .ms-acal-apanel-color8{
    BORDER-COLOR: #Hd266; BACKGROUND-COLOR: #Hd266;
    }

    When I want to save this in the quell-editor-window there pops up two error
    messages saying that “currently no properties can be accessed” and that “the modifications cannot be saved”.

    Any ideas? :(

    btw: thanks so far for the great article!

    Like

      1. This works well on SP2013 as well. I think you’re using the HTML Forms web part, which I have had the same issues with. Try the content editor web part (or visa versa).

        Like

    1. I haven’t tried, and I’m assuming you did, and it didn’t work? Unfortunately the Save as Template is pretty basic, I doubt there’s an easy out of the box way to save the layering.

      Like

  22. Please can you point me in the direction of a good guide for SharePoint scripting – I have created the colour coding (thank you) but don’t know where to start adding this script to stop the new window :-)

    Like

  23. Thanks so much for the instructions. Unfortunately, this only changed the colors on the left side (list of “Calendars in View”) without changing the colors on the actual calendar itself. Could you provide some assistance? Thank you!

    Like

  24. Thanks a lot for your instructions, which I followed and it works fine… the only thing now is that I would like to see the same color scheme used when I edit the calenders in the Overlay settings. Here still the original colors are displayed. How can I make them match?

    Like

  25. David,
    I have a requirement to add 10 calendars in overlay calendar – which i was able to do.
    Now if we can add 10 calendars, why do we have just 9 colors available ?
    Can I add 10th color in my custom css file ? even if i add i will not be able to add it to any calendar.

    Like

      1. This is weird. You can add 10 calendars but only have 9 colors. Unfortunately the CSS and color is related to the selected color, not the calendar itself. So calendar layer 6 can use color #2.

        Like

    1. Hi Jessica. The color numbers as noted above directly correlate to the colors selected from the picker. It doesn’t matter what order the calendars are in, it relates to the value selected for the color.

      Like

  26. Hi David,

    I have a calendar that’s having two views with green and purple color. the problem is when i click the overlay calendars link the title is not changing.

    Corporate
    SA
    VIC

    so when i click the SA link the calendar is showing the events in SA link but still showing the title as Corporate not SA.

    thanks

    Like

  27. Hi David,

    First off, this was a very informative post, so thank you for putting it together.

    Second, have you found any resolution for the disappearing ribbon with calendar overlays?

    Thanks for any help you can pass along.

    Like

  28. Thanks for this post. I was able to successfully modify the colors of my calendar overlays. The one issue I’m still having is using your last bit of code to modify the default calendar color. When an individual calendar overlay is clicked (opening a new calendar without overlays), the color changes back to the default color. I’m trying to change this default color within each overlay to match the color I chose on my main calendar with all overlays applied.

    The issue I’m having is that when I use the below code, I’m not getting any boarders to show up around my calendar events:

    .ms-acal-item {
    BORDER: #000000; BACKGROUND-COLOR: #B1DBFF;
    }
    .ms-acal-default-hover {
    BORDER: #000000; BACKGROUND-COLOR: #B1DBFF;
    }
    .ms-acal-apanel-item {
    BORDER: #000000; BACKGROUND-COLOR: #B1DBFF;
    }

    Is there anything I’m missing or doing wrong that you can see?

    Thanks!

    Like

    1. Try adding solid 1px to the BORDER property, like:

      .ms-acal-color1{ BACKGROUND-COLOR: #0079C1; BORDER: #F00 solid 1px }
      .ms-acal-selcolor1{ BACKGROUND-COLOR: #0079C1; BORDER: #F00 solid 1px }
      .ms-acal-apanel-color1{ BORDER-COLOR: #F00; BACKGROUND-COLOR: #0079C1;}

      Like

  29. Hi, David,

    I can’t change the font color to black, any idea why?

    .ms-acal-color1 .ms-acal-sdiv, .ms-acal-color1 .ms-acal-sdiv a{
    color: #000000 !important
    }
    .ms-acal-apanel-color1 SPAN{
    color: #000000 !important
    }

    .ms-acal-color1{
    BACKGROUND-COLOR: #0000FF
    }
    .ms-acal-selcolor1{
    BACKGROUND-COLOR: #0000FF
    }
    .ms-acal-apanel-color1{
    BORDER-COLOR: #ffffff ; BACKGROUND-COLOR: #0000FF;
    }

    Like

      1. The problem has been fixed by adding:
        .ms-acal-sdiv a, .ms-acal-mdiv a, .ms-acal-ddiv a {
        color: #000000 !important
        }
        I am running SharePoint 2013, and I use Content Editor webpart to call the css file.
        Thanks again for the helpful info.

        Like

  30. I want to add, the font color changed to black in the legend, yet on the calendar it is still white on yellow background. Very hard to read. Many thanks in advance.

    Like

  31. Hi David, I have added your code into the SharePoint site and for whatever reason, whenever i hit save, it will not save the changes. is there something that I am missing?

    Like

    1. You’re hitting save on the page ribbon I assume? Is it erroring out? Have you tried editing the page and just save it without the code just to rule out bugs from my stuff ;)?

      Like

  32. Hi David, thanks for your helpful post. I have implemented the colour overlays and they work fine. I have one problem; the ‘Calendars in View’ key on the left doesn’t show the correct colours, they are all the same. Is there a way to get the menu to match the actual overlays? Many thanks…

    Like

    1. Double check your CSS. There should be 3 CSS attributes per color, one of which is for the left legend. If you want, email me your CSS and I’ll give it a try. David.lozzi at Slalom.com

      Like

      1. Thanks David. As I am using SP on a corporate site I will check with the IT guys to make sure the CSS is being correctly saved and not over-written.

        Like

  33. Hi David –
    Is there anyway to modify a Task List’s calendar view? Just one calendar view and color code the entries based on which Department the task was created for?

    Thanks

    Joe

    Like

      1. We are only using one Task List. Not multiple list for each department. We do capture the department info for each item. I thought we might be able to color code each item based on department name.

        Like

      2. I realize what you mean.

        Although our Production server has not been updated and the filtering of the Calendar View does not work for the Task list.

        It does work in our Integration environment which was just recently patched.

        Thanks

        Joe Monteleone
        Senior Developer
        P: 617.946.8695
        jmonteleone@coverys.com

        One Financial Center
        P.O. Box 55178
        Boston, MA 02205-5178
        http://www.coverys.com
        Toll Free: 800.225.6168

        Like

  34. Hi David , i followed every step you described up till the part where i needed to save the web part. For some reason i kept getting a dialog box saying ” Can’t retrieve any properties at this time” followed by another that says my changes cannot be saved. My calendar has 8 views

    Like

    1. this was what i typed into the web part, i only needed to change one color

      .ms-acal-color7 {
      BACKGROUND-COLOR: #BC8F8F
      }
      .ms-acal-selcolor7 {
      BACKGROUND-COLOR: #BC8F8F
      }
      .ms-acal-apanel-color7 {
      BORDER-COLOR: #BC8F8F;
      BACKGROUND-COLOR: #BC8F8F;
      }

      Like

    2. I’ve seen this before. I think it has to do with your browser. Try editing the page and add any Web part and save. You should get the same error. What browser are you using?

      Like

      1. I just did, it works fine for content editor. Even with/without anything in it, the web part saves in IE, Chrome even Mozilla

        Like

  35. Has anyone figured out how to get more than 9 colors? How about font changes/colors in combination? Any thoughts would be welcomed.

    Like

  36. Hi David,

    Thank you heaps for your brilliant article, and for patiently replying to everyone.
    I’ve come across two issues, the first I resolved, where I was getting the …” Can’t retrieve any properties at this time” when using the HTML Web Form web part. I tried the Script Editor web Part instead and it worked correctly. What I have found with the ledger is, if I select one of the options on the left, it displays the events in the correct view/category but it returns to the default colour of the site theme (pink). Any ideas on how I can retain the same colours used in the default view?

    Thanks

    Like

  37. Greetings, Thank you for this great tool.

    In addition to what you provided; I also add the ability for the calendars to expand to show all events automatically and each calendar that feeds the overlays have had their colors adjusted to match.
    Similar to GovGirl (25Mar13) I am using the calendars to manage 16 individual conference rooms. We have small 4 person rooms that are grouped by floor and larger meeting rooms that are also grouped by floor. I have two rooms (classroom and a privacy room) that stand alone but have included them in the color sequence.
    And your tip makes a huge difference in how things look (much better then the out of the box colors).
    My problem now is that as soon as I set the calendar for Resource Reservations I lose all events and am unable to scroll the page. As soon as I change the settings back the items appear.

    Any thoughts of where I should look to fix this?

    Like

  38. Hi there. I used the code that you had and it worked perfectly in the calendar page. My issue is that I have the calendar embedded on the homepage and I would like for the color code to be the same. Unfortunately it says that the web part change won’t be applied to the homepage. Do you know of a work around for that?

    Thanks!

    Like

  39. I encountered a strange behaviour when adding the CSS via some web part before the calendar. My colours looked fine while editing the page but returned to something else when viewed normally. I have to use the IE8 (sic) but managed to work around this thing.
    I just had to place another web part (even hidden works) before the CSS injector. Any list did it.
    Thanks a lot for your detailled posts.

    Like

    1. Glad it worked! To change the title you can use .ms-acal-title to change all titles. If you want to change title for a specific color, do .ms-acal-color# .ms-acal-title. Let me know!

      Like

      1. So in order to change the title would you need to do this in a separate webpart or do you combine it with the current HTML Code? or put underneath?

        I am definitely not a programmer.

        Like

  40. Hi David, love your articles and this one has really helped me. Is there any way to change the leftside Default Calendar legend text ? Its the very first one in the order. I think this is named according to the Calendar list name but I want to change the text in the legend only. Using DOM I can see that the class is called “ms-acal-apanel-item ms-acal-apanel-color”. Not sure how to add the code to do this and would appreciate if you had any advise. Thanks heaps.

    Like

  41. This worked beautifully for me. I was so surprised as I am NOT a programmer.

    Now my new COLORs are too dark for the title color. So, now I need to change the font color of the title. However, what I noticed is that there are 2 colors associated (HOVER color and the TITLE color). I think the hover color of the text is fine but the TITLE color needs to be made darker so I can see it with my new and darker color coding colors.

    I saw a post and your reply to use: .ms-acal-color# .ms-acal-title
    Would I then do this? .ms-acal-color#000080 .ms-acal-title ?
    Where would I insert this code? Would I put it in between and in the current HTML webpart? Would I add a new webpart?

    Thank-you in advance!
    Helen

    Like

    1. Hi Helen,

      I’m glad this worked for you!! For the text, you should select the number of the color selection you’re using, like .ms-acal-color1 or .ms-acal-color8, etc. Then use that to set color: #000080 in that class. Something like

      .ms-aca-color1 { color: #000080 }

      Like

    1. Figured it out. It was mentioned in the section above.

      .ms-acal-colorX
      .ms-acal-sdiv,
      .ms-acal-colorX

      /* This section changes default item text color */
      .ms-acal-sdiv a{ color: #xxxxxx !important
      }

      /* This section changes default panel item text color */
      .ms-acal-apanel-colorX SPAN{ color: #xxxxxx !important
      }

      Thanks.

      Like

  42. Hi David,
    As a few people have mentioned above, I am unable to get the font color on one of the overlays to change from white (the default) to black. I inserted the code below for the font color that I am trying to change. Color 6 is yellow and is displaying with white font and I need black.

    .ms-acal-color6{
    BACKGROUND-COLOR: #fdfe02
    }

    .ms-acal-selcolor6{
    BACKGROUND-COLOR: #fdfe02
    }

    .ms-acal-apanel-color6{
    BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #fdfe02;
    }

    .ms-acal-color6 .ms-acal-sdiv, .ms-acal-color6 .ms-acal-sdiv a{ color: #000000 !important
    }

    .ms-acal-apanel-color6 SPAN{
    color: #000000 !important
    }

    The second line of CSS to change the legend font to black worked fine. I just can’t get the font on the calendar to change to black!
    Any ideas?
    thanks!
    Jeni

    Like

    1. Take a look in the article again, there’s CSS there for the font color. Also, search this page for font in your browser and you’ll find other comments around fonts. A few people have figured it out as well. Feel free to email me your CSS david.lozzi at slalom.com and I can take a look.

      Like

  43. David, this works great! To change the font color, where do I apply before or after acal-colors?

    .ms-acal-item div, .ms-acal-item div a, .ms-acal-apanel-item SPAN
    { color: #FFFFFF !important}
    }

    Like

  44. This page is incredibly useful, thank you so much for sharing!

    I have one question, is it possible to user a variable, so that if I wanted to change a colour I would only have to modify one value?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: