2

I have 5 calendars where I have overlayed 4 of them inside a general calendar, and for each of the overlayed calendars I have defined a different color (red, green , pink, etc) which worked well. But my problem is as follow; let say the user click on the pink colored calendar, then SharePoint will automatically change the pink color for the calender and its events to be the default blue.

So how I can change this behavior so that the color will stay pink (same as the overlayed color). I have attached two screen shots one for the overlay view, and the other view when the user click on the pink colored calendar , where the color will change to blue.

enter image description here

2

You can modify the CSS for your target calendars. The CSS you want is

.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
}

Throw this in a code snippet or HTML form web part and you should be good. More on my post: http://davidlozzi.com/2012/06/20/customize-the-sharepoint-calendar-colors/

  • thanks for the reply. but in your post , you are changing the color for the overlayed calenders not for the original color ? am i right ?. and how i can modify my CSS for the target calender to have the same color when it is overlayed, i mean i am having 5 calenders that might be the target calender and each of them will have different color ?. – john Gu Sep 17 '13 at 14:46
  • and another point. how i can specify that if calenderA was selected to chnage its color and its events color to be red, while if calenderB was selected to change the color to be pink , etc... – john Gu Sep 17 '13 at 14:49
  • 1
    Looking at the code I posted above, you can use this to change the default color on a calendar view. You will need to add this code and its unique color to every calendar page. – David Lozzi Sep 17 '13 at 14:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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