2013-06-18 59 views
0

我在軌道上使用紅寶石fullcalendar,它運行得非常好。我正在嘗試更改事件的backgound_color屬性,但我無法看到如何獲取它。我能夠改變邊框顏色。fullcalendar不會改變backgoundcolor

我的JSON的樣子:

[ 

    { 
     "_routes": null, 
     "title": "this should be red", 
     "color": "#2308d1", 
     "url": "/events/59", 
     "start": "2013-06-18T00:00:00-05:00", 
     "end": "2013-06-18T22:59:59-05:00", 
     "allDay": false, 
     "event_id": 59, 
     "background_color": "red" 
    }, 
] 

我想要的東西漂亮與社區分享和來源是這裏 https://github.com/mzararagoza/rails-fullcalendar-icecube

回答

2

可以定義爲每種類型的事件的類名,如:

[    
    url: ajaxcallURL(_url,"6"), 
    type: 'POST',         
    //error: function() { alert('something broke with courses...'); }, 
    data:{                 
    'func':func, 
    'year':y 
    }, 
    cache: false,    
    color: '#FF931E', //This is the color for the events 
    textColor: 'white' 
    className: 'myCssClassName' //in the Css you can use the class to set the background color for the events, i think this overrides color property.          
] 

還是你想表格單元格顏色?因爲這是完全不同的...