拔出我留下的小毛髮,試圖按照js fullcalendar控件上的文檔獲取單個事件的背景以進行更改。流星和事件背景色中的pretty-fullcalendar包
我在這裏跟着幾個其他線程,如Adding nice colors to events in FullCalendar (jquery)和fullcalendar backgroundColor property,這些都暗示我設置了事件的屬性backgroundColor,或者設置了一個類並將其附加到事件,所有這些都被忽略。
我可以設法改變的唯一事情是如果我設置事件的顏色屬性,它將邊框顏色更改爲套件(根據文檔,應該設置整個事件的顏色)。
我推他們到事件的數組傳遞到日曆如下
events: function(start, end, callback) {
var events = [];
reqEvents = Requests.find();
reqEvents.forEach(function(evt){
event = {id:evt._id,title:evt.title,start:evt.start,end:evt.end,color:evt.color};
event.className = 'todo';
events.push(event);
})
callback(events);
console.log(events);
},
這是在模板渲染功能我設置這些屬性。我試過做這個內聯,我已經嘗試過顏色命名事件,我可以在文檔中找到,但沒有任何更改,但沒有任何更改背景或文字顏色。
想法??
我還放置一個修復拉請求爲:https:/ /github.com/priyadarshy/meteor-fullcalendar/pull/1 –