1
4

1 回答 1

2

这很容易做到。您只需要在源对象中设置类名。覆盖默认样式选项需要相当多级别的 CSS 选择器,看看在你的情况下什么是有效的。

CSS:

.fc-content .fc-view .localSource2 div.fc-event-inner {
  background: red;
} /* you might want to trim this selector down, but it worked for me */

Javascript:

localSource = {
  events: [ {title: 'All Day Event', start: new Date(y, m, 1)}, 
            /* More Event Data here */ ],
  className: 'localSource', // an option!
  currentTimezone: 'Europe/Bucharest', // an option!        
}; 
USHolidays = {
  url: 'http://www.google.com/calendar/feeds/usa__en%40holiday.calendar.google.com/public/full',    
  className: 'gcal-event', // an option!
  currentTimezone: 'America/Chicago', // an option!
};
options = {
    eventSources: [localSource, USHolidays]
};

fullCalendar(options); // EventSources are set in options

事件源文档也提到了其他属性(颜色、文本颜色)。

于 2013-03-23T09:57:38.527 回答