EDIT 2: Some new changes to the fc-event-skin class ... now this is just an fc event, so style should not be a problem. Please mark the author's note here fullcalendar fc-event class ...
EDIT 1: Perhaps this is not a mistake.
The best approach is to set className in the event object and add it to the elements found by the fc-event-skin class. However, your added class will appear later in css and the colors will not take precedence, so you should use! Important It also retains "fake" rounded corners ...
Spend this method on the calendar ...
eventRender: function (event, element, view) { element.find('.fc-event-skin').addClass(event.className.join(' ')); }
This is in your own stylesheet ...
.redGray { border-color: DarkGray !important; background-color: LightGray !important; color: red !important; }
ORIGINAL RESPONSE:
I think this is a small mistake in the rendering code. The element parameter is a jQuery object, so you can change it based on user event data. If you set the style and text of the element, it will display the color that you set; however, it seems to me that other styles are removed from the element, such as rounded corners, and the formatting of time and text.
eventRender: function (event, element) { if (event.LeadId != null) { element.css('color', 'blue'); element.css('background-color', 'yellow'); element.text(element.text); }
GoClimbColorado
source share