Fullcalendar: Change the color for specific days

前端 未结 8 930
伪装坚强ぢ
伪装坚强ぢ 2020-12-08 16:31

I\'m stuck with a project I get at work. I need to change the background color of some days. It\'s a calendar where the user should see, which days are available and which n

8条回答
  •  时光说笑
    2020-12-08 16:48

    For the views month, basicWeek and basicDay you can change the rendering of the days by providing a dayRender function. E.g.:

    $("#calendar").fullCalendar({
        dayRender: function (date, cell) {
            cell.css("background-color", "red");
        }
    });
    

    The documentation for dayRender is available here: http://arshaw.com/fullcalendar/docs/display/dayRender/

    And here's a working example on jsfiddle: http://jsfiddle.net/kvakulo/CYnJY/4/

提交回复
热议问题