2015-07-13 75 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。

無論我放在我的代碼中,文件中的後臺事件都被設置爲!重要,並覆蓋了 。