Summary:
Calendar events that start before current period and end after it aren't shown in calendars
Detailed Description:
If I create an event that starts on e.g. January 1st and ends on March 31st,
that event will not be visible in the admin area when I navigate to February,
even though I believe it should.
The problem can be fixed by editing action.admin_ajax_fetchevents.php and
replacing the following block:
if( $start && $end ) {
$where[] = '((E.event_date_start BETWEEN ? AND ?) OR (E.event_date_end
BETWEEN ? AND ?))';
$parms[] = trim($db->DbTimeStamp($start),"'");
$parms[] = trim($db->DbTimeStamp($end),"'");
$parms[] = trim($db->DbTimeStamp($start),"'");
$parms[] = trim($db->DbTimeStamp($end),"'");
}
with the following:
if( $start && $end ) {
$where[] = '((E.event_date_start < ?) AND (E.event_date_end > ?))';
$parms[] = trim($db->DbTimeStamp($end),"'");
$parms[] = trim($db->DbTimeStamp($start),"'");
}
Note that this would skip zero-length events that occur on event_date_start or
event_date_end. I haven't tested if it's possible to create such events, but if
it is, the comparison operators above should probably be changed to their "or
equals" siblings.
It seems that this issue is also relevant to front-end (I haven't tested
properly yet). To fix it, same change should be made to the file named
action.ajax_fetchevents.php .