| Issue 17: | color days with events | |
| 1 person starred this issue and may be notified of changes. | Back to list |
is it possible to hide the events, but color the days with events? I would like to make a small view of the calendar too, and then there is not enough space for the eventtext on every day...
May 22, 2009
Thanks for your reaction, i will wait for your post then. This will give backgroundcolor to a day? That would be perfect, then all i need is a way to hide the eventtitles ...
May 22, 2009
Reading it again i see you wrote coloring the events, that's not quite what i mean, i am looking for a way to color the day. I want this because i want to make a small calendar too. On a mouseover or a clickevent the events will be showed. It must be possible because 'today' is also colored. But coloring the events is also something i can use, so thanks again for that.
May 25, 2009
takeab...@live.com, in version 1.2 youll be able to specify a class in your event data (class meaning class="" in HTML). I think you had this request in a previous issue. Then you can just change your stylesheet, making the solution much cleaner (instead of modifying the core of FullCalendar). paul, This might be beyond the scope of FullCalendar (maybe this should be a plugin called SmallCalendar :) I've actually seen other calendar scripts out there that do this (and only this), but i cant recall their names.
Status:
Done
Jun 2, 2009
I downloaded the 1.2 version. Thank you for upgrading it. I'm not sure how to use the class ... is it something i can add to my array in PHP? where can i add my new classes in the css?
Jun 2, 2009
yes, add a className property to the array you are generating in PHP. examples
echo json_encode(array(
array(
id => 1
title => "Event 1",
start => "2009-05-01",
className => "meeting"
)
));
as you can see, its a property of each event, not of the entire array itself.
for the css end of things, open up fullcalendar.css. you'll see a comment in there to
help you write css to change the color
Jun 30, 2009
Hi. Adamrshaw ,can you tell me where we can add the new classes in the css.please Thank you!!
Jun 30, 2009
zineb.mechale try add in to file fullcalendar.css or after definded calendar css file.
Jun 30, 2009
Thanks Max :)
Apr 3, 2011
(No comment was entered for this change.)
Status:
Duplicate
Mergedinto: 885 |
|
| ► Sign in to add a comment |
If you're talking about color-coding the events, I was able to achieve that with this modification in version 1.0, starting on line 366. Then simply add a "color" field with your event information with a hex color code. I'm planning to update my modification for version 1.1 and I will post it here. .append("<tr>" + (seg.isStart ? "<td class='nw' />" : '') + "<td class='n' style='background-color: #" + event.color + ";' />" + (seg.isEnd ? "<td class='ne' />" : '') + "</tr>") .append("<tr>" + (seg.isStart ? "<td class='w' style='background-color: #" + event.color + ";' />" : '') + "<td class='c' style='background-color: #" + event.color + ";' />" + (seg.isEnd ? "<td class='e' style='background-color: #" + event.color + ";' />" : '') + "</tr>") .append("<tr>" + (seg.isStart ? "<td class='sw' />" : '') + "<td class='s' style='background-color: #" + event.color + ";' />" + (seg.isEnd ? "<td class='se' />" : '') + "</tr>");