【发布时间】:2014-09-25 07:00:06
【问题描述】:
我有 eventRender 函数来更改特定类名的日背景。
eventRender: function (event, element, view) {
if (event.className == 'booked') {
var dateString = $.fullCalendar.formatDate(event.start, 'yyyy-MM-dd');
view.element.find('.fc-day[data-date="' + dateString + '"]').css('background-color', '#FAA732');
}
},
此功能在 fullcalendar 1.6.4 上正常工作,但在 2.1 版中不能正常工作(我已经将日期转换更改为时刻)。
Uncaught TypeError: Cannot read property 'find' of undefined fullcalendar
另一个问题是,这个函数只改变事件开始的背景,而不是事件的整个日期
【问题讨论】:
标签: jquery fullcalendar