ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Calendar tag expiration date issue

June 02, 2010 7:23am

Subscribe [2]
  • #1 / Jun 02, 2010 7:23am

    mrwoods09

    4 posts

    Hi,

    I’m trying to format the expiration date but having issues, it doesn’t seem to like the format.

    {exp:weblog:calendar switch="calendarToday|calendarCell" weblog="events" show_future_entries="yes" show_expired="yes" start_day="monday"} 
    
    <div id="calendar-control">
        <div id="previous-week"><a href="http://{previous_path=events/index}"><<</a></div>
        <div id="current-week">{date format="%F %Y"}</div>
        <div id="next-week"><a href="http://{next_path=events/index}class=calendarMonthLinks">>></a></div>
    </div>
    
    <table id="events-calendar" class="calendarBG" border="0" cellpadding="6" cellspacing="1" summary="My Calendar">
        <tr>
            {calendar_heading}
            <th class="calendarDayHeading">{lang:weekday_long}</th>
            {/calendar_heading}
        </tr>
    
        {calendar_rows}
        {row_start}<tr>{/row_start}
                {if entries}
                <td class='{switch}'>
                    {day_number}
                    <ul>
                        {entries}
                        <li>
                            <h4><a href="http://{title_permalink=events/view}">{title}</a></h4>
    <p>                        {entry_date format="%g:%i %a"} - {expiration_date format='%g:%i %a'}<br />
                        </li><br />
                        {/entries}<br />
                    </ul><br />
                </td><br />
                {/if}<br />
                {if not_entries}<br />
                <td class='{switch}'><br />
                    {day_number}<br />
                </td><br />
                {/if}<br />
                {if blank}<br />
                <td class='calendarBlank'><br />
                    {day_number}<br />
                </td><br />
                {/if}</p>
    
    <p>    {row_end}</tr>{/row_end}<br />
        {/calendar_rows}<br />
    </table></p>
    
    <p>{/exp:weblog:calendar}

  • #2 / Jun 07, 2010 3:19pm

    Robin Sowell

    13255 posts

    That’s not actually a bug, as the only date variable supported is the entry_date- see the calendar docs.  It is pulling in the expiration date data directly from the database when it pulls in the exp_weblog_titles data, so it would be possible to format it out w/some php (and localize etc if desired).  You could likely hash that out in ‘How to’ if needed.  And depending on how sophisticated the calendar needs to be- Solspace has some add-ons that might be worth a look.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases