| Issue 13: | Event Types - Classes - With Solution | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Needed to have different types of events listed on the calendar .. eg
Office Events, Personal Events, Holidays etc so came up with this solution..
the returned CalEvent has an optional "class" attribute.. then in the
fullcalendar.js i added the following lines
before line 433 ( buildEventText(event, element.find('td.c')); )
i added:
if (typeof event.class != 'undefined' && event.class != '') {
element.addClass(event.class);
}
I know this can be achieved via the eventRender option
eventRender: function(event,element) {
if (typeof event.class != 'undefined' && event.class != '') {
element.addClass(event.class);
}
}
but this support "out of the box" would be good.
eg if the event's class is officeEvent, then css code can then be added as so:
.full-calendar-month .officeEvent td {
background: #35698F !important;
color: #FFF !important;
}
// this changes the event's colouring to make it differentiable from other
events
May 14, 2009
#1
Totally....@gmail.com
May 17, 2009
this is very reasonable and only takes up about 1 line. committed this to the trunk (though I chose to use "cssClass" instead of just "class"... reserved word) will be in version 1.2. thanks
Status:
Fixed
Labels: -Type-Defect Type-Enhancement
May 25, 2009
Great. Thanks.. Be Good to see v1.2 so far it's an excellent job :)
May 31, 2009
version 1.2 just released. has this "className" option... see docs. thanks
Jun 1, 2009
No Thank You :)
Aug 13, 2013
(No comment was entered for this change.)
Status:
Implemented
Aug 13, 2013
(No comment was entered for this change.)
Status:
Released
|
|
| ► Sign in to add a comment |