CodeIgniter Forums
Adding a CSS class to a Calendar link - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: Adding a CSS class to a Calendar link (/thread-1848.html)



Adding a CSS class to a Calendar link - El Forum - 06-30-2007

[eluser]lefrog[/eluser]
Hi there

Being new to code igniter I must say its a great development tool.

I have added a calendar to my application and it works a treat.

However, I would like to add some extra usability to it in the form of a css class to colour the links I've added to the calendar.

Each link I have added to the calendar is an event and I have four types of event. Each type of event I would like to have a different colour.

i.e.
Social - blue
Educational - yellow
etc.

So in a roundabout way has anyone got any ideas on how I could possibly add a class to a link in the calendar.

Hope someone can be of help!!!!!!!!!!

Big ups to the code igniter developers


Adding a CSS class to a Calendar link - El Forum - 07-01-2007

[eluser]champs[/eluser]
I ran into similar limitations with the Calendar and wrote my own extension to the class. Refreshing my memory, it seems that each day is an associative array, and each key is considered a variable in the table cell. I used it to produce cell definitions like:
Code:
<td class="available" id="cal20070701">

Oh, and here's my calendar mod.

EDIT:
Holy crap, half the year's gone by already!


Adding a CSS class to a Calendar link - El Forum - 07-01-2007

[eluser]lefrog[/eluser]
Cheers for getting back champs, much appreciated.