开发者

Fullcalendar change color of some events

开发者 https://www.devze.com 2022-12-28 11:04 出处:网络
I need to change color of some events in Fullcalendar plugin. I tried \"className\" property in the constructor of \"events\" object. However, i couldnt achieve to change the color and css. I checked

I need to change color of some events in Fullcalendar plugin.

I tried "className" property in the constructor of "events" object. However, i couldnt achieve to change the color and css. I checked on the firebug. The css 开发者_如何学编程of the event td's are still using default css.

I am generating calendar in the codebehind by using RegisterClientScriptBlock. Maybe that can be a problem, but i dont think so. What do you think?


For class Name 'other' I've gotten the following CSS to work. At first, I was missing one of the selectors and had the same issue as you.

.other, .fc-agenda .other .fc-event-time, .other a {
    background-color: #066333;/* background color */
    border-color: #066333;/* border color (often same as background-color) */
    color: #fff;/* text color */
}     


I've accoumplished this before using jQuery's addClass like $("."+calEvent.id).addClass("classWithDifferentCSS"); Each cal event has a class with its ID.

0

精彩评论

暂无评论...
验证码 换一张
取 消