這很容易完成。你只需要在源對象中設置className。 需要相當多的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
Event Source Documentation提及其他屬性太(顏色,文本顏色)。
嘗試爲每個不同類型的任務傳遞不同的CSS類。只是一個想法。 – Zippie 2013-03-15 20:11:22