SharePoint 2013 Custom Calendar Colors

1. As we know, There are only 10 kinds of colors in overlay calendar, here is the color to choose:

2. Then, we couldn't custom the color to render in calendar, here is the result:

 

 

3. Now, I  want to custom the color of the calendar, we notice the point that the  color of the calendar is render via the class name "ms-acal-apanel-color"

<a class="ms-acal-apanel-item ms-acal-apanel-color2" href="/Lists/Calendar2/Operations%20Calendar.aspx">

so, we just modify the css file of the class named "ms-acal-apanel-color2".

4. Here is the code:

<style>
.ms-acal-color1{ BACKGROUND-COLOR: #4668C5} 
.ms-acal-selcolor1{ BACKGROUND-COLOR: #4668C5} 
.ms-acal-apanel-color1{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #4668C5;} 

.ms-acal-color2{ BACKGROUND-COLOR: #442359} 
.ms-acal-selcolor2{ BACKGROUND-COLOR: #442359} 
.ms-acal-apanel-color2{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #442359;} 

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

.ms-acal-color4{ BACKGROUND-COLOR: #007233} 
.ms-acal-selcolor4{ BACKGROUND-COLOR: #007233} 
.ms-acal-apanel-color4{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #007233;} 

.ms-acal-color5{ BACKGROUND-COLOR: #84009e} 
.ms-acal-selcolor5{ BACKGROUND-COLOR: #84009e} 
.ms-acal-apanel-color5{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #84009e;}

.ms-acal-color6{ BACKGROUND-COLOR: #008272} 
.ms-acal-selcolor6{ BACKGROUND-COLOR: #008272} 
.ms-acal-apanel-color6{ BORDER-COLOR: #C3B7AC; BACKGROUND-COLOR: #008272;}
</style>

Note: I only show 5 colors, you also add others. 
you just keep the code into a css file and upload the file to you sharepoint site, then use the file.

5. Then, edit the calendar page, and add a webpart named ContenEditor Webpart, configure the webpart and input the url of the css file in the souce file

6. Fisinihed.

 

More to link : http://davidlozzi.com/2012/06/20/customize-the-sharepoint-calendar-colors/

 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值