If an event is far in the future, the event calendar will be empty.
For sites relying on the calendar to notify of an upcoming event, skipping forward to that event when fetching a calendar would be more useful.
In 5.x I did something like:
case 0:
$time = _event_user_date();
if (arg(0) == 'event' && is_numeric(arg(1))) {
// follow event calendar
$year = (arg(1) ? arg(1) : gmdate('Y', $time));
$month = (arg(2) ? arg(2) : gmdate('m', $time));
$day = (arg(3) ? arg(3) : gmdate('d', $time));
$stamp = gmmktime(0, 0, 0, $month, $day, $year);
}
else {
// default to time of most recent future event
$result = db_query(db_rewrite_sql('SELECT event_start FROM {event} where event_start > %d'), time());
if ($first = db_fetch_object($result)) {
$stamp = $first->event_start;
}
else {
$stamp = _event_user_date();
}
}

6.x uses the date array at this point, so I suppose the timestamp would need conversion - in any case, I didn't offer a config option for this, so I hesitate to provide a diff ;)

Comments

killes@www.drop.org’s picture

Component: Event Views » Code

Have you tried the "upcoming events" block?

kyber’s picture

A calendar was required (to properly indicate when in the month the event was occurring), not a list.
Not sure this is desired behaviour for everyone, but blank months aren't that great.

japerry’s picture

Status: Active » Closed (outdated)

Event for Drupal 8 is unrelated to older versions. If an issue similar to this one exists, please open a new issue with the 8.x branch.