canvs / fullcalendar

Automatically exported from code.google.com/p/fullcalendar
0 stars 0 forks source link

color days with events #17

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
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...

Original issue reported on code.google.com by paul.wol...@gmail.com on 19 May 2009 at 11:15

GoogleCodeExporter commented 9 years ago
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>");

Original comment by takeab...@live.com on 21 May 2009 at 1:17

GoogleCodeExporter commented 9 years ago
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 ...

Original comment by paul.wol...@gmail.com on 22 May 2009 at 11:09

GoogleCodeExporter commented 9 years ago
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.

Original comment by paul.wol...@gmail.com on 22 May 2009 at 11:14

GoogleCodeExporter commented 9 years ago
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.

Original comment by adamrs...@gmail.com on 25 May 2009 at 5:46

GoogleCodeExporter commented 9 years ago
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?

Original comment by paul.wol...@gmail.com on 2 Jun 2009 at 12:34

GoogleCodeExporter commented 9 years ago
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

Original comment by adamrs...@gmail.com on 2 Jun 2009 at 2:45

GoogleCodeExporter commented 9 years ago
Hi.

Adamrshaw ,can you tell me where we can add the new classes in the css.please
Thank you!!

Original comment by zineb.me...@gmail.com on 30 Jun 2009 at 11:49

GoogleCodeExporter commented 9 years ago
zineb.mechale try add in to file fullcalendar.css or after definded calendar 
css file.

Original comment by Max.Kama...@gmail.com on 30 Jun 2009 at 1:15

GoogleCodeExporter commented 9 years ago
Thanks Max :)

Original comment by zineb.me...@gmail.com on 30 Jun 2009 at 9:34

GoogleCodeExporter commented 9 years ago

Original comment by adamrs...@gmail.com on 3 Apr 2011 at 11:43