CodeIgniter Forums

Full Version: Adding a CSS class to a Calendar link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[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

El Forum

[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!

El Forum

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