Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
48
rated 0 times [  53] [ 5]  / answers: 1 / hits: 44972  / 13 Years ago, thu, april 14, 2011, 12:00:00

I'm using the last version of fullcalendar, I looked on documentation how change background color event, but I don't know how make to different events.

I need for code sample with events red, blue, green, like the following picture:



enter



I see this code, on document site, but I can't to apply 2 colors:



$('#calendar').fullCalendar({
editable: true,
events: [{
title: 'Teste1',
start: new Date(y, m, d, 10, 30),
allDay: false,
editable: false
}, {
title: 'Teste2',
start: new Date(y, m, d, 11, 40),
allDay: false
}],
eventColor: '#378006'
});

More From » jquery

 Answers
25

Since you are using the latest version (1.5), you can set the backgroundColor property.



{
title: 'Teste1',
start: new Date(y, m, d, 10, 30),
allDay: false,
editable: false,
backgroundColor: '#SomeColor'
},
{
title: 'Teste2',
start: new Date(y, m, d, 11, 40),
allDay: false,
backgroundColor: '#SomeOtherColor'
}


You can also set the textColor property if you need to change that as well.


[#92717] Wednesday, April 13, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
deanna

Total Points: 84
Total Questions: 86
Total Answers: 107

Location: Cyprus
Member since Wed, Dec 8, 2021
3 Years ago
;