CGCalendar - upcoming list removing today's date too soon

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
ittsmee2
Forum Members
Forum Members
Posts: 23
Joined: Sat Nov 19, 2005 12:42 am

CGCalendar - upcoming list removing today's date too soon

Post by ittsmee2 »

When should today's event rotate off the upcoming events template in CGCalendar?  It appears that any event scheduled for today disappears from my upcoming events template.

Here is my template:

Code: Select all

<table class="reg tiger-stripe" style="width:98%;">
<tr style="background-color:#c4884d; font-weight:bold;">
<td width="10%">Date</td>
<td width="10%">Time</td>
<td width="25%">City, State</td>
<td width="35%">Venue</td>
<td width="20%">Info</td>
</tr>

{foreach from=$events key=key item=event}
	
<tr>

<td width="10%">
{assign var=month_number value=$event.event_date_start|date_format:"%m"}
	{assign var=end_month_number value=$event.event_date_end|date_format:"%m"}
	{if $event.event_date_start == $event.event_date_end || $event.event_date_end == 0}
	<div class="calendar-date-from">
{$event.event_date_start|date_format:"%m"}/{$event.event_date_start|date_format:"%d"}/{$event.event_date_start|date_format:"%y"}
</div>
	{else}
	{if $event.event_date_start|date_format:"%d%m%Y" == $event.event_date_end|date_format:"%d%m%Y"}
	<div class="calendar-date-from">
{$event.event_date_start|date_format:"%m"}/{$event.event_date_start|date_format:"%d"}/{$event.event_date_start|date_format:"%y %l:%M %p"} {$lang.to} {$event.event_date_end|date_format:"%l:%M %p"}</div>
	{else}
	<div class="calendar-date-from">
{$event.event_date_start|date_format:"%m"}/{$event.event_date_start|date_format:"%d"}/{$event.event_date_start|date_format:"%y"} {$lang.to} {$event.event_date_end|date_format:"%m"}/{$event.event_date_start|date_format:"%d"}/{$event.event_date_end|date_format:"%y"}</div>
	{/if}
	{/if}
</td>

<td width="10%">
<div class="calendar-date-from">
{$event.event_date_start|date_format:"%l:%M %p"}
</div>
</td>

<td width="25%">{$event.event_title}</td>

<td width="35%">
	{if $event.event_summary !="" && ($detail != 1 || ($event.event_details =="" ||  $event.event_details == "<br />"))}
		<div class="calendar-summary">{$event.event_summary}</div>
	{/if}
	{* optionally display detail information 
		{if $event.event_details !="" && $event.event_details != "<br />"}
		<div class="calendar-details"><span class="calendar-details-title">{$lang.details}: </span>{$event.event_details}</div>
		{/if}
	*}
</td>

<td width="20%">
	<a href="{$event.url}">{$mod->Lang('cal_more')}</a>
</td>	
</tr>
{/foreach}

</table>

{if $return_url != ""}
<div class="calendar-returnlink right">{$return_url}</div>
{/if}
mjrumble
Forum Members
Forum Members
Posts: 19
Joined: Tue Sep 15, 2009 7:59 pm

Re: CGCalendar - upcoming list removing today's date too soon

Post by mjrumble »

Hi,

As far as I can see this is not a problem with your code. Try and set the time for your event. Once that time has elapsed the event will be removed from the upcoming events. The default is set to 00.00, so if you do not change the time once that day arrives the events is removed for the upcoming events as it has pasted.
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: CGCalendar - upcoming list removing today's date too soon

Post by paulbaker »

I have tested this and mjrumble is correct, it depends on the time of the event - if the time has passed (even by 1 minute), the event is dropped from the upcoming list.

I have the same issue as ittsmee2.  It would be nice to show all of today's events, even if the start time has passed (think of a guy rushing to a meeting 5 minutes late, checking a website for location of meeting....and the event disappeared from the page 5 minutes ago when it started).

Any ideas on a hack to achieve this?

Thanks
To copy System Information to the forum:
https://docs.cmsmadesimple.org/troubles ... nformation

CMS Made Simple Geekmoots attended:
Nottingham, UK 2012 | Ghent, Belgium 2015 | Leicester, UK 2016
User avatar
paulbaker
Dev Team Member
Dev Team Member
Posts: 1465
Joined: Sat Apr 18, 2009 10:09 pm
Location: Maidenhead, UK
Contact:

Re: CGCalendar - upcoming list removing today's date too soo

Post by paulbaker »

Well I found a solution for this - see http://forum.cmsmadesimple.org/viewtopi ... =7&t=55058
Locked

Return to “Modules/Add-Ons”