| Issue 1723: | Troubles with background-color the "eventRender" callback function | |
| 1 person starred this issue and may be notified of changes. | Back to list |
I've tried to change the background-color et the border-color of an element with the "eventRender" callback function like this :
eventRender: function(event, element) {
if (event.status == 'cancelled') {
element.css('border-color', '#FF0000');
element.css('background-color', '#FF0000');
} else {
if (event.status == 'displayed') {
element.css('border-color', '#378006');
element.css('background-color', '#378006');
}
};
},
During the rendering of the element, the border-color is modified but not the background-color.
To have a correct display, I had to comment the following line in fullcalendar.css
/* background-color: #36c; /* default BACKGROUND color */
and to modify my callback function like this :
eventRender: function(event, element) {
if (event.status == 'cancelled') {
element.css('border-color', '#FF0000');
element.css('background-color', '#FF0000');
} else {
if (event.status == 'displayed') {
element.css('border-color', '#378006');
element.css('background-color', '#378006');
} else {
element.css('border-color', '#36c'); // Default color
element.css('background-color', '#36c'); // Default color
}
};
},
I dont think it is the best issue....
Does someone has a new proposition?
Sorry about my english...
Thanks and Regards,
Mickael.
Fullcalendar version 1.5.4
Aug 23, 2013
Project Member
#1
adamrs...@gmail.com
Status:
Done
|
|
| ► Sign in to add a comment |