我面临fullcalendar的问题,我正在尝试更改特定日期完整列的颜色。我已经试过了,但它只在一天内改变单元格颜色,我想改变那个特定日期的完整列颜色
dayRender: function (date, cell) { var today = moment('2018-12-28T00:00Z'); if (date.isSame(today, "day")) { cell.css("background", "#EEEEEE"); //cell.addClass('fc-selectable-false'); } }
通过将事件对象的属性呈现为“背景”, 像这样的,,
$('#calendar').fullCalendar({ defaultDate: '2018-11-10', defaultView: 'agendaWeek', events: [ { start: '2018-12-10T10:00:00', end: '2018-12-10T16:00:00', rendering: 'background' } ] });
有关更多信息,请参阅完整日历文档: https://fullcalendar.io/docs/background-events