grey out past events in calendar

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
johnmck
Forum Members
Forum Members
Posts: 34
Joined: Wed May 30, 2007 4:56 pm

grey out past events in calendar

Post by johnmck »

Hi,
I'm trying to grey out old events in my calendar:

I've tried the following but I get errors saying something about dividing by zero

Code: Select all

{if ($smarty.now|date_format:"%d%m%Y) > ($event.event_date_start|date_format:"%d%m%Y)} 
<td  class="eventcol" >
<div class="calendar-date-from">
{$event.event_date_start|date_format:"%e"} {$month_names[$month_number]} {$event.event_date_start|date_format:"%Y"}
</div>
</td>

{else}
<td  class="eventcol" >
<div class="calendar-date-passed">
passed{$event.event_date_start|date_format:"%e"} 
{$month_names[$month_number]} {$event.event_date_start|date_format:"%Y"}
</div>
</td>

{/if}
johnmck
Forum Members
Forum Members
Posts: 34
Joined: Wed May 30, 2007 4:56 pm

Re: grey out past events in calendar

Post by johnmck »

hi,I'm bumping this!

does anybody know!
Post Reply

Return to “CMSMS Core”