-
-
Notifications
You must be signed in to change notification settings - Fork 213
Eventlist: Option "shortened view" not activated – multi-day events show up with dates already past #8782
Comments
Does the "hide running events" checkbox change this? |
No, it doesn't make a difference. (Tested on the demo just now.) |
@fritzmg Can you confirm this? |
Working further on this and also #8786 I found out the following: My changes look like this: // Skip occurrences in the past but show running events (see #8497)
if ($event['repeatEnd'] && $event['end'] < $intStart)
{
continue;
} I added the two following if statements: // Skip occurrences in the past but show running events, for long list view only
if (!$this->cal_noSpan && strpos($this->cal_format,'next') !== false && $day < $currTime-86400)
{
continue;
}
// Skip occurrences in the future but show running events, for long list view only
if (!$this->cal_noSpan && strpos($this->cal_format,'past') !== false && $day > $currTime-86400)
{
continue;
} I have not tested this extensively and I admit that it does not look very elegant. But at this point it is the best I could come up with (events are one tricky subject! and are driving me little insane at this point) and maybe it could help you finding the best possible solution. This of course does not fix the problems with the overlap from #8786! Just in case you wondered. |
Fixed in 03d2a8b. |
Hi, I just applied your fix and noticed one little problem: if (!$this->cal_noSpan && strncmp($this->cal_format, 'next_', 5) === 0 && $day < $intStart)
{
continue;
}
if (!$this->cal_noSpan && strncmp($this->cal_format, 'past_', 5) === 0 && $day >= $intEnd)
{
continue;
} Thanks! |
Hi, It seems that recurring events in the past show up in event lists when the event list settings are set to "show future events". The first occurance of the event seems to be the indicator for showing or not showing the event items. Thanks! |
@arno1979 How can I reproduce this? |
Never mind, I found out myself. Fixed in 477bb59. |
Steps to reproduce:
Result: Today (2017-09-11) the eventlist shows single events from 2017-09-01 to 2017-09-15. (see screenshot)
Expected result: Only events from 2017-09-11 to 2017-09-15 are shown.
This applies to both Contao 3.x.x and 4.x.x
The text was updated successfully, but these errors were encountered: