[英]How can I change the specefic event background color in JQuery FullCalendar
How can I change the event background color while on rendering events on calendar. 在日历上渲染事件时如何更改事件背景颜色。 How can I change specific event background color in javascript, I have assigned the event with id.
如何在javascript中更改特定事件的背景颜色,我已为事件分配了ID。
you may alter the " fc-event
" values in the fullcalendar.css
to change the default event background, 您可以更改
fullcalendar.css
的“ fc-event
”值以更改默认事件背景,
or you can add a new css class as follows: 或者您可以添加一个新的CSS类,如下所示:
.newtype,
.fc-agenda .newtype.fc-event-time,
.newtype a {
border-style: solid;
border-color: #6da; /* default BORDER color (probably the same as background-color) */
background-color: #6da; /* #36c; default BACKGROUND color */
color: #fff; /* default TEXT color */
}
and specify it to the event throught className
: 并通过
className
将其指定给事件:
event.className="newtype";
ps you need get the event object by function .fullCalendar( 'clientEvents', event_id)
first ps您需要先通过函数
.fullCalendar( 'clientEvents', event_id)
获取事件对象
Good luck 祝好运
would make sure the event has a specific "className" and then color it through css. 将确保事件具有特定的“ className”,然后通过css对其进行着色。 more info here: http://arshaw.com/fullcalendar/docs/event_rendering/Colors/
此处提供更多信息: http : //arshaw.com/fullcalendar/docs/event_rendering/Colors/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.