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

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.

Social - blue
Educational - yellow

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

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:
<td class="available" id="cal20070701">

Oh, and here's my calendar mod.

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

El Forum

Cheers for getting back champs, much appreciated.