Board Logo

Custom color for "expired" table rows
spw2000 - 12/4/2008 at 12:54 AM

I use Tables Pro to display an events calendar in date order - I want to retain old events (ie older than today) but show them as "expired" or "past" by coloring the rows light grey - I suspect I have to add something to the color section in the template (see below) but how/where do I activate this new color using something like if rowdate > today then color: expired ???

'colors' : {
'even' : 'white',
'odd' : '#E8EFF5',
'hovered' : '#ffffcc',
'marked' : '#ffcc66',
'expired' : '#AAAAAA' <---- new entry ???


An extract from the content file (events.js) contains:
["2009-01-26", "26/01/2009", "Committee Meeting", "Events & Com Mtg", "St Kilda RSL"],
["2009-02-08", "8/2/2009", "Demonstration ", "St Kilda Festival", "St Kilda"],
["2009-02-02", "2/2/2009", "Social", "Social Weekend", "Torquay"],
["2009-02-14", "14/2/2009 to 15/2/2009", "Social and Competition", "Hookstock (2 days)", "TBA"],
["2009-02-23", "23/02/2009", "Committee Meeting", "Events & Com Mtg", "St Kilda RSL"],

Back to forum: