2015-07-13 77 views
0

我无法设置Fullcalendar(2.3.2版)事件的背景颜色。 我尝试过dayRender,color,backgroundColor没有成功。 可能是什么问题? 这里是我的代码:无法设置Fullcalendar背景事件颜色

$('#calendar').fullCalendar({ 
    width: 750, 
    height: 550, 
    header: { 
     left: '', 
     center: 'title', 
     right: '' 
    }, 
    year: 2015, 
    month: 6, 
    date: 13, 
    events: [{ 
     title: 'test', 
     stato: 'NoResponseReceived', 
     subject: 'test ', 
     body: '', 
     location: '', 
     startdate: '14/7/2015 08:00:00', 
     enddate: '14/7/2015 08:30:00', 
     start: new Date(2015, 6, 14), 
     end: new Date(2015, 6, 14), 
     backgroundColor: '#ff0000' 
    }], 
    color: '#ff0000', 
    dayRender: function(calEvent, cell, date) { 
     cell.css('background-color', '#ff0000'); 
    }, 
    viewRender: function(view, element) {} 
}); 

回答

1

最终我的问题是,我已经包括fullcalendar.print.css。

无论我放在我的代码中,文件中的后台事件都被设置为!重要,并覆盖了 。