Open finnlewis opened 3 years ago
I'm adding an additional check to this.
$filters = $view->getExposedInput();
if ( isset($filters['end']) && strlen($filters['end']) > 0 ) {
$filters['end'] = date('Y-m-d', strtotime($filters['end'] . ' + 1 days'));;
$view->setExposedInput($filters);
}
The hook_views_query_alter in https://github.com/localgovdrupal/localgov_events/blob/master/localgov_events.module#L188 works fine when an end date is set, but if left empty when other filters are set, in incorrectly sets the end date to today + 1. It should only do this if the end date is set.