In my calendar I want to colour each event in a different colour. Is there currently a way to send to the full calendar, in the JSON it expects a value for a colour?
FullCalendar
Seems I missed it the first time I read the manual:
I send for each day the following JSON:
{"id":"1",
"start":"1272513600",
"end":"1272513600",
"allDay":"1",
"title":"Repeat 1,Day 1",
"className":"eventColorX"}
The important thing is the className and where the X is a number (depends on the CSS, see below).
And then in the CSS:
.eventColor1,
.fc-agenda .eventColor1 .fc-event-time,
.eventColor1 a {
background-color: green; /* background color */
border-color: green; /* border color */
color: yellow; /* text color */
}
.eventColor2,
.fc-agenda .eventColor2 .fc-event-time,
.eventColor2 a {
background-color: purple; /* background color */
border-color: purple; /* border color */
color: white; /* text color */
}
.
.
.
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With