如何自定义完整日历特定日期的颜色。 (例如,我想将红色设置为一个月内所有星期五的背景颜色)
答案 0 :(得分:1)
你可以试试这个:
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
},
defaultView: 'month',
dayRender: function ( date, cell) {
if (moment(date).weekday() == 5) {
cell.css("background-color", "red");
}
},
});
});
https://jsfiddle.net/wke7w839/
最好的问候 的Krzysztof