Answers.Body: <p>I ran into this on a Joomla site and may be related. For me, the online registration settings didn’t have an end/date time. Once I set this, these events no longer showed. Again, this was on a Joomla site (no sidebar) and may not be related. </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-10T00:34:53.677Z
Answers.Text: This also happened on events which did not have online registration enabled
Answers.UserDisplayName: josh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-09T05:52:08.517Z
Answers.LastActivityDate: 2019-01-09T05:52:08.517Z
Answers.UserDisplayName: Taylor Pyles
Answers.Body: <p>In the filter criteria of the view, add the filter - CiviCRM Events: End Date (>= now)</p>
  
  <p><a href="https://i.sstatic.net/yEWz8.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/yEWz8.jpg" alt="enter image description here"></a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-10T00:34:33.277Z
Answers.Text: How do I get to this page?
Answers.UserDisplayName: josh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-10T01:40:58.737Z
Answers.Text: I found it! Didnt look hard enough the first time. Thank you for this!
Answers.UserDisplayName: josh
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-01-09T10:28:42.637Z
Answers.LastActivityDate: 2019-01-09T10:28:42.637Z
Answers.UserDisplayName: Anil
Body: <p>Currently running Drupal 7.61 with CiviCRM 5.7.2.</p>
  
  <p>We have the "CiviCRM Upcoming" block enabled in our sidebar, however it continues to display events after their start date.</p>
  
  <p>I've been fixing this by manually going into CiviCRM and disabling events which have passed, but ideally would like the Upcoming Events block to only display events which are actually upcoming (as I read it should here: <a href="https://wiki.civicrm.org/confluence/display/CRMDOC46/Event+Listings" rel="nofollow noreferrer">https://wiki.civicrm.org/confluence/display/CRMDOC46/Event+Listings</a>)</p>
  
  <p>Thank you in advance!</p>
  
  <p>Views export below (not sure if I've done this properly -- haven't done it before!)</p>
  
  <pre><code>$view = new view();
  $view-&gt;name = 'civicrm_events';
  $view-&gt;description = 'Calendar of CiviCRM Events';
  $view-&gt;tag = 'civicrm';
  $view-&gt;base_table = 'civicrm_event';
  $view-&gt;human_name = 'CiviCRM Events';
  $view-&gt;core = 7;
  $view-&gt;api_version = '3.0';
  $view-&gt;disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  
  /* Display: Master */
  $handler = $view-&gt;new_display('default', 'Master', 'default');
  $handler-&gt;display-&gt;display_options['title'] = 'Event Calendar';
  $handler-&gt;display-&gt;display_options['use_ajax'] = TRUE;
  $handler-&gt;display-&gt;display_options['use_more_always'] = FALSE;
  $handler-&gt;display-&gt;display_options['access']['type'] = 'perm';
  $handler-&gt;display-&gt;display_options['access']['perm'] = 'view event info';
  $handler-&gt;display-&gt;display_options['cache']['type'] = 'none';
  $handler-&gt;display-&gt;display_options['query']['type'] = 'views_query';
  $handler-&gt;display-&gt;display_options['query']['options']['query_comment'] = FALSE;
  $handler-&gt;display-&gt;display_options['exposed_form']['type'] = 'basic';
  $handler-&gt;display-&gt;display_options['pager']['type'] = 'some';
  $handler-&gt;display-&gt;display_options['pager']['options']['items_per_page'] = '5';
  $handler-&gt;display-&gt;display_options['pager']['options']['offset'] = '0';
  $handler-&gt;display-&gt;display_options['style_plugin'] = 'calendar_style';
  $handler-&gt;display-&gt;display_options['style_options']['name_size'] = '3';
  $handler-&gt;display-&gt;display_options['style_options']['mini'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['with_weekno'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_theme'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['theme_style'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['max_items'] = '0';
  $handler-&gt;display-&gt;display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler-&gt;display-&gt;display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' =&gt; '#ffffff',
    'page' =&gt; '#ffffff',
  );
  /* Header: Global: Text area */
  $handler-&gt;display-&gt;display_options['header']['area']['id'] = 'area';
  $handler-&gt;display-&gt;display_options['header']['area']['table'] = 'views';
  $handler-&gt;display-&gt;display_options['header']['area']['field'] = 'area';
  $handler-&gt;display-&gt;display_options['header']['area']['label'] = 'Year Month Week Day';
  $handler-&gt;display-&gt;display_options['header']['area']['content'] = '&lt;table&gt;&lt;tr&gt;&lt;td&gt;&lt;a href="/events/year/&lt;?php print date(\'Y\'); ?&gt;"&gt;This Year&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="/events/month/&lt;?php print date(\'Y-m\'); ?&gt;"&gt;This Month&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="/events/week/&lt;?php print date(\'Y-m-d\'); ?&gt;"&gt;This Week&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="/events/day/&lt;?php print date(\'Y-m-d\'); ?&gt;"&gt;Today&lt;/a&gt;&lt;/td&gt;&lt;td&gt;&lt;a href="/upcoming"&gt;Full List&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;';
  $handler-&gt;display-&gt;display_options['header']['area']['format'] = 'php_code';
  /* Footer: Global: Text area */
  $handler-&gt;display-&gt;display_options['footer']['area']['id'] = 'area';
  $handler-&gt;display-&gt;display_options['footer']['area']['table'] = 'views';
  $handler-&gt;display-&gt;display_options['footer']['area']['field'] = 'area';
  $handler-&gt;display-&gt;display_options['footer']['area']['label'] = 'More events';
  $handler-&gt;display-&gt;display_options['footer']['area']['content'] = '&lt;a href="/events/month/&lt;?php print date(\'Y-m\'); ?&gt;"&gt;More events&lt;/a&gt;';
  $handler-&gt;display-&gt;display_options['footer']['area']['format'] = 'php_code';
  /* Field: CiviCRM Events: Title */
  $handler-&gt;display-&gt;display_options['fields']['title']['id'] = 'title';
  $handler-&gt;display-&gt;display_options['fields']['title']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['fields']['title']['field'] = 'title';
  $handler-&gt;display-&gt;display_options['fields']['title']['label'] = '';
  $handler-&gt;display-&gt;display_options['fields']['title']['element_label_colon'] = FALSE;
  $handler-&gt;display-&gt;display_options['fields']['title']['hide_alter_empty'] = FALSE;
  $handler-&gt;display-&gt;display_options['fields']['title']['link_to_civicrm_event'] = 'page';
  /* Field: CiviCRM Events: Start Date */
  $handler-&gt;display-&gt;display_options['fields']['start_date']['id'] = 'start_date';
  $handler-&gt;display-&gt;display_options['fields']['start_date']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['fields']['start_date']['field'] = 'start_date';
  $handler-&gt;display-&gt;display_options['fields']['start_date']['label'] = '';
  $handler-&gt;display-&gt;display_options['fields']['start_date']['element_label_colon'] = FALSE;
  $handler-&gt;display-&gt;display_options['fields']['start_date']['hide_alter_empty'] = FALSE;
  $handler-&gt;display-&gt;display_options['fields']['start_date']['date_format'] = 'long';
  /* Field: CiviCRM Address: City / Suburb */
  $handler-&gt;display-&gt;display_options['fields']['city']['id'] = 'city';
  $handler-&gt;display-&gt;display_options['fields']['city']['table'] = 'civicrm_address';
  $handler-&gt;display-&gt;display_options['fields']['city']['field'] = 'city';
  $handler-&gt;display-&gt;display_options['fields']['city']['label'] = '';
  $handler-&gt;display-&gt;display_options['fields']['city']['element_label_colon'] = FALSE;
  $handler-&gt;display-&gt;display_options['fields']['city']['location_type'] = '0';
  $handler-&gt;display-&gt;display_options['fields']['city']['location_op'] = '0';
  $handler-&gt;display-&gt;display_options['fields']['city']['is_primary'] = 0;
  /* Sort criterion: CiviCRM Events: Start Date */
  $handler-&gt;display-&gt;display_options['sorts']['start_date']['id'] = 'start_date';
  $handler-&gt;display-&gt;display_options['sorts']['start_date']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['sorts']['start_date']['field'] = 'start_date';
  $handler-&gt;display-&gt;display_options['sorts']['start_date']['granularity'] = 'minute';
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['id'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['field'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_action'] = 'default';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['granularity'] = 'year';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' =&gt; 'civicrm_event.start_date',
  );
  /* Filter criterion: CiviCRM Events: Is Active */
  $handler-&gt;display-&gt;display_options['filters']['is_active']['id'] = 'is_active';
  $handler-&gt;display-&gt;display_options['filters']['is_active']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['filters']['is_active']['field'] = 'is_active';
  $handler-&gt;display-&gt;display_options['filters']['is_active']['value'] = '1';
  $handler-&gt;display-&gt;display_options['filters']['is_active']['group'] = 0;
  /* Filter criterion: CiviCRM Events: Is Public */
  $handler-&gt;display-&gt;display_options['filters']['is_public']['id'] = 'is_public';
  $handler-&gt;display-&gt;display_options['filters']['is_public']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['filters']['is_public']['field'] = 'is_public';
  $handler-&gt;display-&gt;display_options['filters']['is_public']['value'] = '1';
  $handler-&gt;display-&gt;display_options['filters']['is_public']['group'] = 0;
  
  /* Display: Month */
  $handler = $view-&gt;new_display('page', 'Month', 'page');
  $handler-&gt;display-&gt;display_options['display_description'] = 'Monthly calendar of events';
  $handler-&gt;display-&gt;display_options['defaults']['pager'] = FALSE;
  $handler-&gt;display-&gt;display_options['pager']['type'] = 'date_views_pager';
  $handler-&gt;display-&gt;display_options['pager']['options']['date_id'] = 'month';
  $handler-&gt;display-&gt;display_options['defaults']['style_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['style_plugin'] = 'calendar_style';
  $handler-&gt;display-&gt;display_options['style_options']['name_size'] = '3';
  $handler-&gt;display-&gt;display_options['style_options']['mini'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['with_weekno'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_theme'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['theme_style'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['max_items'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_hidden'] = array(
    'start_date' =&gt; 'start_date',
    'city' =&gt; 'city',
  );
  $handler-&gt;display-&gt;display_options['defaults']['style_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['row_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler-&gt;display-&gt;display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' =&gt; '#ffffff',
    'page' =&gt; '#ffffff',
  );
  $handler-&gt;display-&gt;display_options['defaults']['row_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['footer'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['id'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['field'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_action'] = 'default';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' =&gt; 'civicrm_event.start_date',
  );
  $handler-&gt;display-&gt;display_options['path'] = 'events/month';
  
  /* Display: Week */
  $handler = $view-&gt;new_display('page', 'Week', 'page_1');
  $handler-&gt;display-&gt;display_options['display_description'] = 'Weekly calendar of events';
  $handler-&gt;display-&gt;display_options['defaults']['pager'] = FALSE;
  $handler-&gt;display-&gt;display_options['pager']['type'] = 'date_views_pager';
  $handler-&gt;display-&gt;display_options['pager']['options']['link_format'] = 'clean';
  $handler-&gt;display-&gt;display_options['pager']['options']['skip_empty_pages'] = 0;
  $handler-&gt;display-&gt;display_options['defaults']['style_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['style_plugin'] = 'calendar_style';
  $handler-&gt;display-&gt;display_options['style_options']['calendar_type'] = 'week';
  $handler-&gt;display-&gt;display_options['style_options']['name_size'] = '3';
  $handler-&gt;display-&gt;display_options['style_options']['mini'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['with_weekno'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_theme'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['theme_style'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['max_items'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_hidden'] = array(
    'start_date' =&gt; 'start_date',
    'city' =&gt; 'city',
  );
  $handler-&gt;display-&gt;display_options['defaults']['style_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['row_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler-&gt;display-&gt;display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' =&gt; '#ffffff',
    'page' =&gt; '#ffffff',
  );
  $handler-&gt;display-&gt;display_options['defaults']['row_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['id'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['field'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_action'] = 'default';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['granularity'] = 'week';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' =&gt; 'civicrm_event.start_date',
  );
  $handler-&gt;display-&gt;display_options['path'] = 'events/week';
  $handler-&gt;display-&gt;display_options['menu']['title'] = 'News &amp; Events';
  $handler-&gt;display-&gt;display_options['menu']['description'] = 'Events This Week';
  $handler-&gt;display-&gt;display_options['menu']['weight'] = '0';
  $handler-&gt;display-&gt;display_options['menu']['name'] = 'main-menu';
  $handler-&gt;display-&gt;display_options['menu']['context'] = 0;
  $handler-&gt;display-&gt;display_options['menu']['context_only_inline'] = 0;
  
  /* Display: Day */
  $handler = $view-&gt;new_display('page', 'Day', 'page_2');
  $handler-&gt;display-&gt;display_options['display_description'] = 'Daily calendar of events';
  $handler-&gt;display-&gt;display_options['defaults']['pager'] = FALSE;
  $handler-&gt;display-&gt;display_options['pager']['type'] = 'date_views_pager';
  $handler-&gt;display-&gt;display_options['pager']['options']['skip_empty_pages'] = 0;
  $handler-&gt;display-&gt;display_options['defaults']['style_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['style_plugin'] = 'calendar_style';
  $handler-&gt;display-&gt;display_options['style_options']['calendar_type'] = 'day';
  $handler-&gt;display-&gt;display_options['style_options']['name_size'] = '3';
  $handler-&gt;display-&gt;display_options['style_options']['mini'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['with_weekno'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_theme'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['theme_style'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['max_items'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['groupby_times'] = 'half';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_hidden'] = array(
    'start_date' =&gt; 'start_date',
    'city' =&gt; 'city',
  );
  $handler-&gt;display-&gt;display_options['defaults']['style_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['row_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler-&gt;display-&gt;display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' =&gt; '#ffffff',
    'page' =&gt; '#ffffff',
  );
  $handler-&gt;display-&gt;display_options['defaults']['row_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['id'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['field'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_action'] = 'default';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['granularity'] = 'day';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' =&gt; 'civicrm_event.start_date',
  );
  $handler-&gt;display-&gt;display_options['path'] = 'events/day';
  
  /* Display: Year */
  $handler = $view-&gt;new_display('page', 'Year', 'page_3');
  $handler-&gt;display-&gt;display_options['display_description'] = 'Annual calendar of events';
  $handler-&gt;display-&gt;display_options['defaults']['pager'] = FALSE;
  $handler-&gt;display-&gt;display_options['pager']['type'] = 'date_views_pager';
  $handler-&gt;display-&gt;display_options['pager']['options']['date_id'] = 'month';
  $handler-&gt;display-&gt;display_options['pager']['options']['link_format'] = 'clean';
  $handler-&gt;display-&gt;display_options['pager']['options']['skip_empty_pages'] = 0;
  $handler-&gt;display-&gt;display_options['defaults']['style_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['style_plugin'] = 'calendar_style';
  $handler-&gt;display-&gt;display_options['style_options']['calendar_type'] = 'year';
  $handler-&gt;display-&gt;display_options['style_options']['name_size'] = '3';
  $handler-&gt;display-&gt;display_options['style_options']['mini'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['with_weekno'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_theme'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['theme_style'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['max_items'] = '0';
  $handler-&gt;display-&gt;display_options['defaults']['style_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['row_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler-&gt;display-&gt;display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' =&gt; '#ffffff',
    'page' =&gt; '#ffffff',
  );
  $handler-&gt;display-&gt;display_options['defaults']['row_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['footer'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['id'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['field'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_action'] = 'default';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['granularity'] = 'year';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' =&gt; 'civicrm_event.start_date',
  );
  $handler-&gt;display-&gt;display_options['path'] = 'events/year';
  
  /* Display: Block */
  $handler = $view-&gt;new_display('block', 'Block', 'block_1');
  $handler-&gt;display-&gt;display_options['defaults']['style_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['style_plugin'] = 'calendar_style';
  $handler-&gt;display-&gt;display_options['style_options']['name_size'] = '3';
  $handler-&gt;display-&gt;display_options['style_options']['mini'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['with_weekno'] = '0';
  $handler-&gt;display-&gt;display_options['style_options']['multiday_theme'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['theme_style'] = '1';
  $handler-&gt;display-&gt;display_options['style_options']['max_items'] = '0';
  $handler-&gt;display-&gt;display_options['defaults']['style_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['row_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler-&gt;display-&gt;display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' =&gt; '#ffffff',
    'page' =&gt; '#ffffff',
  );
  $handler-&gt;display-&gt;display_options['defaults']['row_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['footer'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['id'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['field'] = 'start_date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_action'] = 'default';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler-&gt;display-&gt;display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' =&gt; 'civicrm_event.start_date',
  );
  
  /* Display: Upcoming */
  $handler = $view-&gt;new_display('block', 'Upcoming', 'block_2');
  $handler-&gt;display-&gt;display_options['display_description'] = 'Upcoming Events';
  $handler-&gt;display-&gt;display_options['defaults']['style_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['style_plugin'] = 'list';
  $handler-&gt;display-&gt;display_options['defaults']['style_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['row_plugin'] = FALSE;
  $handler-&gt;display-&gt;display_options['row_plugin'] = 'fields';
  $handler-&gt;display-&gt;display_options['defaults']['row_options'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['header'] = FALSE;
  $handler-&gt;display-&gt;display_options['defaults']['arguments'] = FALSE;
  $handler-&gt;display-&gt;display_options['block_description'] = 'CiviCRM Upcoming';
  </code></pre>
  
Tags: <civievent><drupal>
Title: “CiviCRM Upcoming” block displaying old events
ThreadText: # “CiviCRM Upcoming” block displaying old events
  
  (Asked by: username_0 on 2019-01-08)
  
  Currently running Drupal 7.61 with CiviCRM 5.7.2.
  
  We have the "CiviCRM Upcoming" block enabled in our sidebar, however it continues to display events after their start date.
  
  I've been fixing this by manually going into CiviCRM and disabling events which have passed, but ideally would like the Upcoming Events block to only display events which are actually upcoming (as I read it should here: <https://wiki.civicrm.org/confluence/display/CRMDOC46/Event+Listings>)
  
  Thank you in advance!
  
  Views export below (not sure if I've done this properly -- haven't done it before!)
  
  ```
  $view = new view();
  $view->name = 'civicrm_events';
  $view->description = 'Calendar of CiviCRM Events';
  $view->tag = 'civicrm';
  $view->base_table = 'civicrm_event';
  $view->human_name = 'CiviCRM Events';
  $view->core = 7;
  $view->api_version = '3.0';
  $view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
  
  /* Display: Master */
  $handler = $view->new_display('default', 'Master', 'default');
  $handler->display->display_options['title'] = 'Event Calendar';
  $handler->display->display_options['use_ajax'] = TRUE;
  $handler->display->display_options['use_more_always'] = FALSE;
  $handler->display->display_options['access']['type'] = 'perm';
  $handler->display->display_options['access']['perm'] = 'view event info';
  $handler->display->display_options['cache']['type'] = 'none';
  $handler->display->display_options['query']['type'] = 'views_query';
  $handler->display->display_options['query']['options']['query_comment'] = FALSE;
  $handler->display->display_options['exposed_form']['type'] = 'basic';
  $handler->display->display_options['pager']['type'] = 'some';
  $handler->display->display_options['pager']['options']['items_per_page'] = '5';
  $handler->display->display_options['pager']['options']['offset'] = '0';
  $handler->display->display_options['style_plugin'] = 'calendar_style';
  $handler->display->display_options['style_options']['name_size'] = '3';
  $handler->display->display_options['style_options']['mini'] = '0';
  $handler->display->display_options['style_options']['with_weekno'] = '0';
  $handler->display->display_options['style_options']['multiday_theme'] = '1';
  $handler->display->display_options['style_options']['theme_style'] = '1';
  $handler->display->display_options['style_options']['max_items'] = '0';
  $handler->display->display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' => '#ffffff',
    'page' => '#ffffff',
  );
  /* Header: Global: Text area */
  $handler->display->display_options['header']['area']['id'] = 'area';
  $handler->display->display_options['header']['area']['table'] = 'views';
  $handler->display->display_options['header']['area']['field'] = 'area';
  $handler->display->display_options['header']['area']['label'] = 'Year Month Week Day';
  $handler->display->display_options['header']['area']['content'] = '<table><tr><td><a href="/events/year/<?php print date(\'Y\'); ?>">This Year</a></td><td><a href="/events/month/<?php print date(\'Y-m\'); ?>">This Month</a></td><td><a href="/events/week/<?php print date(\'Y-m-d\'); ?>">This Week</a></td><td><a href="/events/day/<?php print date(\'Y-m-d\'); ?>">Today</a></td><td><a href="/upcoming">Full List</a></td></tr></table>';
  $handler->display->display_options['header']['area']['format'] = 'php_code';
  /* Footer: Global: Text area */
  $handler->display->display_options['footer']['area']['id'] = 'area';
  $handler->display->display_options['footer']['area']['table'] = 'views';
  $handler->display->display_options['footer']['area']['field'] = 'area';
  $handler->display->display_options['footer']['area']['label'] = 'More events';
  $handler->display->display_options['footer']['area']['content'] = '<a href="/events/month/<?php print date(\'Y-m\'); ?>">More events</a>';
  $handler->display->display_options['footer']['area']['format'] = 'php_code';
  /* Field: CiviCRM Events: Title */
  $handler->display->display_options['fields']['title']['id'] = 'title';
  $handler->display->display_options['fields']['title']['table'] = 'civicrm_event';
  $handler->display->display_options['fields']['title']['field'] = 'title';
  $handler->display->display_options['fields']['title']['label'] = '';
  $handler->display->display_options['fields']['title']['element_label_colon'] = FALSE;
  $handler->display->display_options['fields']['title']['hide_alter_empty'] = FALSE;
  $handler->display->display_options['fields']['title']['link_to_civicrm_event'] = 'page';
  /* Field: CiviCRM Events: Start Date */
  $handler->display->display_options['fields']['start_date']['id'] = 'start_date';
  $handler->display->display_options['fields']['start_date']['table'] = 'civicrm_event';
  $handler->display->display_options['fields']['start_date']['field'] = 'start_date';
  $handler->display->display_options['fields']['start_date']['label'] = '';
  $handler->display->display_options['fields']['start_date']['element_label_colon'] = FALSE;
  $handler->display->display_options['fields']['start_date']['hide_alter_empty'] = FALSE;
  $handler->display->display_options['fields']['start_date']['date_format'] = 'long';
  /* Field: CiviCRM Address: City / Suburb */
  $handler->display->display_options['fields']['city']['id'] = 'city';
  $handler->display->display_options['fields']['city']['table'] = 'civicrm_address';
  $handler->display->display_options['fields']['city']['field'] = 'city';
  $handler->display->display_options['fields']['city']['label'] = '';
  $handler->display->display_options['fields']['city']['element_label_colon'] = FALSE;
  $handler->display->display_options['fields']['city']['location_type'] = '0';
  $handler->display->display_options['fields']['city']['location_op'] = '0';
  $handler->display->display_options['fields']['city']['is_primary'] = 0;
  /* Sort criterion: CiviCRM Events: Start Date */
  $handler->display->display_options['sorts']['start_date']['id'] = 'start_date';
  $handler->display->display_options['sorts']['start_date']['table'] = 'civicrm_event';
  $handler->display->display_options['sorts']['start_date']['field'] = 'start_date';
  $handler->display->display_options['sorts']['start_date']['granularity'] = 'minute';
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler->display->display_options['arguments']['start_date']['id'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler->display->display_options['arguments']['start_date']['field'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['default_action'] = 'default';
  $handler->display->display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler->display->display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler->display->display_options['arguments']['start_date']['granularity'] = 'year';
  $handler->display->display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler->display->display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' => 'civicrm_event.start_date',
  );
  /* Filter criterion: CiviCRM Events: Is Active */
  $handler->display->display_options['filters']['is_active']['id'] = 'is_active';
  $handler->display->display_options['filters']['is_active']['table'] = 'civicrm_event';
  $handler->display->display_options['filters']['is_active']['field'] = 'is_active';
  $handler->display->display_options['filters']['is_active']['value'] = '1';
  $handler->display->display_options['filters']['is_active']['group'] = 0;
  /* Filter criterion: CiviCRM Events: Is Public */
  $handler->display->display_options['filters']['is_public']['id'] = 'is_public';
  $handler->display->display_options['filters']['is_public']['table'] = 'civicrm_event';
  $handler->display->display_options['filters']['is_public']['field'] = 'is_public';
  $handler->display->display_options['filters']['is_public']['value'] = '1';
  $handler->display->display_options['filters']['is_public']['group'] = 0;
  
  /* Display: Month */
  $handler = $view->new_display('page', 'Month', 'page');
  $handler->display->display_options['display_description'] = 'Monthly calendar of events';
  $handler->display->display_options['defaults']['pager'] = FALSE;
  $handler->display->display_options['pager']['type'] = 'date_views_pager';
  $handler->display->display_options['pager']['options']['date_id'] = 'month';
  $handler->display->display_options['defaults']['style_plugin'] = FALSE;
  $handler->display->display_options['style_plugin'] = 'calendar_style';
  $handler->display->display_options['style_options']['name_size'] = '3';
  $handler->display->display_options['style_options']['mini'] = '0';
  $handler->display->display_options['style_options']['with_weekno'] = '0';
  $handler->display->display_options['style_options']['multiday_theme'] = '1';
  $handler->display->display_options['style_options']['theme_style'] = '1';
  $handler->display->display_options['style_options']['max_items'] = '0';
  $handler->display->display_options['style_options']['multiday_hidden'] = array(
    'start_date' => 'start_date',
    'city' => 'city',
  );
  $handler->display->display_options['defaults']['style_options'] = FALSE;
  $handler->display->display_options['defaults']['row_plugin'] = FALSE;
  $handler->display->display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' => '#ffffff',
    'page' => '#ffffff',
  );
  $handler->display->display_options['defaults']['row_options'] = FALSE;
  $handler->display->display_options['defaults']['footer'] = FALSE;
  $handler->display->display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler->display->display_options['arguments']['start_date']['id'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler->display->display_options['arguments']['start_date']['field'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['default_action'] = 'default';
  $handler->display->display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler->display->display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler->display->display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler->display->display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' => 'civicrm_event.start_date',
  );
  $handler->display->display_options['path'] = 'events/month';
  
  /* Display: Week */
  $handler = $view->new_display('page', 'Week', 'page_1');
  $handler->display->display_options['display_description'] = 'Weekly calendar of events';
  $handler->display->display_options['defaults']['pager'] = FALSE;
  $handler->display->display_options['pager']['type'] = 'date_views_pager';
  $handler->display->display_options['pager']['options']['link_format'] = 'clean';
  $handler->display->display_options['pager']['options']['skip_empty_pages'] = 0;
  $handler->display->display_options['defaults']['style_plugin'] = FALSE;
  $handler->display->display_options['style_plugin'] = 'calendar_style';
  $handler->display->display_options['style_options']['calendar_type'] = 'week';
  $handler->display->display_options['style_options']['name_size'] = '3';
  $handler->display->display_options['style_options']['mini'] = '0';
  $handler->display->display_options['style_options']['with_weekno'] = '0';
  $handler->display->display_options['style_options']['multiday_theme'] = '1';
  $handler->display->display_options['style_options']['theme_style'] = '1';
  $handler->display->display_options['style_options']['max_items'] = '0';
  $handler->display->display_options['style_options']['multiday_hidden'] = array(
    'start_date' => 'start_date',
    'city' => 'city',
  );
  $handler->display->display_options['defaults']['style_options'] = FALSE;
  $handler->display->display_options['defaults']['row_plugin'] = FALSE;
  $handler->display->display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' => '#ffffff',
    'page' => '#ffffff',
  );
  $handler->display->display_options['defaults']['row_options'] = FALSE;
  $handler->display->display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler->display->display_options['arguments']['start_date']['id'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler->display->display_options['arguments']['start_date']['field'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['default_action'] = 'default';
  $handler->display->display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler->display->display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler->display->display_options['arguments']['start_date']['granularity'] = 'week';
  $handler->display->display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler->display->display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' => 'civicrm_event.start_date',
  );
  $handler->display->display_options['path'] = 'events/week';
  $handler->display->display_options['menu']['title'] = 'News & Events';
  $handler->display->display_options['menu']['description'] = 'Events This Week';
  $handler->display->display_options['menu']['weight'] = '0';
  $handler->display->display_options['menu']['name'] = 'main-menu';
  $handler->display->display_options['menu']['context'] = 0;
  $handler->display->display_options['menu']['context_only_inline'] = 0;
  
  /* Display: Day */
  $handler = $view->new_display('page', 'Day', 'page_2');
  $handler->display->display_options['display_description'] = 'Daily calendar of events';
  $handler->display->display_options['defaults']['pager'] = FALSE;
  $handler->display->display_options['pager']['type'] = 'date_views_pager';
  $handler->display->display_options['pager']['options']['skip_empty_pages'] = 0;
  $handler->display->display_options['defaults']['style_plugin'] = FALSE;
  $handler->display->display_options['style_plugin'] = 'calendar_style';
  $handler->display->display_options['style_options']['calendar_type'] = 'day';
  $handler->display->display_options['style_options']['name_size'] = '3';
  $handler->display->display_options['style_options']['mini'] = '0';
  $handler->display->display_options['style_options']['with_weekno'] = '0';
  $handler->display->display_options['style_options']['multiday_theme'] = '1';
  $handler->display->display_options['style_options']['theme_style'] = '1';
  $handler->display->display_options['style_options']['max_items'] = '0';
  $handler->display->display_options['style_options']['groupby_times'] = 'half';
  $handler->display->display_options['style_options']['multiday_hidden'] = array(
    'start_date' => 'start_date',
    'city' => 'city',
  );
  $handler->display->display_options['defaults']['style_options'] = FALSE;
  $handler->display->display_options['defaults']['row_plugin'] = FALSE;
  $handler->display->display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' => '#ffffff',
    'page' => '#ffffff',
  );
  $handler->display->display_options['defaults']['row_options'] = FALSE;
  $handler->display->display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler->display->display_options['arguments']['start_date']['id'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler->display->display_options['arguments']['start_date']['field'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['default_action'] = 'default';
  $handler->display->display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler->display->display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler->display->display_options['arguments']['start_date']['granularity'] = 'day';
  $handler->display->display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler->display->display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' => 'civicrm_event.start_date',
  );
  $handler->display->display_options['path'] = 'events/day';
  
  /* Display: Year */
  $handler = $view->new_display('page', 'Year', 'page_3');
  $handler->display->display_options['display_description'] = 'Annual calendar of events';
  $handler->display->display_options['defaults']['pager'] = FALSE;
  $handler->display->display_options['pager']['type'] = 'date_views_pager';
  $handler->display->display_options['pager']['options']['date_id'] = 'month';
  $handler->display->display_options['pager']['options']['link_format'] = 'clean';
  $handler->display->display_options['pager']['options']['skip_empty_pages'] = 0;
  $handler->display->display_options['defaults']['style_plugin'] = FALSE;
  $handler->display->display_options['style_plugin'] = 'calendar_style';
  $handler->display->display_options['style_options']['calendar_type'] = 'year';
  $handler->display->display_options['style_options']['name_size'] = '3';
  $handler->display->display_options['style_options']['mini'] = '0';
  $handler->display->display_options['style_options']['with_weekno'] = '0';
  $handler->display->display_options['style_options']['multiday_theme'] = '1';
  $handler->display->display_options['style_options']['theme_style'] = '1';
  $handler->display->display_options['style_options']['max_items'] = '0';
  $handler->display->display_options['defaults']['style_options'] = FALSE;
  $handler->display->display_options['defaults']['row_plugin'] = FALSE;
  $handler->display->display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' => '#ffffff',
    'page' => '#ffffff',
  );
  $handler->display->display_options['defaults']['row_options'] = FALSE;
  $handler->display->display_options['defaults']['footer'] = FALSE;
  $handler->display->display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler->display->display_options['arguments']['start_date']['id'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler->display->display_options['arguments']['start_date']['field'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['default_action'] = 'default';
  $handler->display->display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler->display->display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler->display->display_options['arguments']['start_date']['granularity'] = 'year';
  $handler->display->display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler->display->display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' => 'civicrm_event.start_date',
  );
  $handler->display->display_options['path'] = 'events/year';
  
  /* Display: Block */
  $handler = $view->new_display('block', 'Block', 'block_1');
  $handler->display->display_options['defaults']['style_plugin'] = FALSE;
  $handler->display->display_options['style_plugin'] = 'calendar_style';
  $handler->display->display_options['style_options']['name_size'] = '3';
  $handler->display->display_options['style_options']['mini'] = '0';
  $handler->display->display_options['style_options']['with_weekno'] = '0';
  $handler->display->display_options['style_options']['multiday_theme'] = '1';
  $handler->display->display_options['style_options']['theme_style'] = '1';
  $handler->display->display_options['style_options']['max_items'] = '0';
  $handler->display->display_options['defaults']['style_options'] = FALSE;
  $handler->display->display_options['defaults']['row_plugin'] = FALSE;
  $handler->display->display_options['row_plugin'] = 'civicrm_event_calendar';
  $handler->display->display_options['row_options']['colors']['calendar_colors_type'] = array(
    'article' => '#ffffff',
    'page' => '#ffffff',
  );
  $handler->display->display_options['defaults']['row_options'] = FALSE;
  $handler->display->display_options['defaults']['footer'] = FALSE;
  $handler->display->display_options['defaults']['arguments'] = FALSE;
  /* Contextual filter: CiviCRM Events: Start Date */
  $handler->display->display_options['arguments']['start_date']['id'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['table'] = 'civicrm_event';
  $handler->display->display_options['arguments']['start_date']['field'] = 'start_date';
  $handler->display->display_options['arguments']['start_date']['default_action'] = 'default';
  $handler->display->display_options['arguments']['start_date']['default_argument_type'] = 'date';
  $handler->display->display_options['arguments']['start_date']['summary']['format'] = 'default_summary';
  $handler->display->display_options['arguments']['start_date']['add_delta'] = 'yes';
  $handler->display->display_options['arguments']['start_date']['date_fields'] = array(
    'civicrm_event.start_date' => 'civicrm_event.start_date',
  );
  
  /* Display: Upcoming */
  $handler = $view->new_display('block', 'Upcoming', 'block_2');
  $handler->display->display_options['display_description'] = 'Upcoming Events';
  $handler->display->display_options['defaults']['style_plugin'] = FALSE;
  $handler->display->display_options['style_plugin'] = 'list';
  $handler->display->display_options['defaults']['style_options'] = FALSE;
  $handler->display->display_options['defaults']['row_plugin'] = FALSE;
  $handler->display->display_options['row_plugin'] = 'fields';
  $handler->display->display_options['defaults']['row_options'] = FALSE;
  $handler->display->display_options['defaults']['header'] = FALSE;
  $handler->display->display_options['defaults']['arguments'] = FALSE;
  $handler->display->display_options['block_description'] = 'CiviCRM Upcoming';
  
  ```
  
  **Tags:** civievent, drupal
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-01-09. Score: 3 | Accepted answer
  
  In the filter criteria of the view, add the filter - CiviCRM Events: End Date (>= now)
  
  [![enter image description here](https://i.sstatic.net/yEWz8.jpg)](https://i.sstatic.net/yEWz8.jpg)
  
  > **Comments:**
  > **username_0**: How do I get to this page?  
  > **username_0**: I found it! Didnt look hard enough the first time. Thank you for this!  
  
  ---
  
  ### Answer by username_1 on 2019-01-09. Score: 1
  
  I ran into this on a Joomla site and may be related. For me, the online registration settings didn’t have an end/date time. Once I set this, these events no longer showed. Again, this was on a Joomla site (no sidebar) and may not be related.
  
  > **Comments:**
  > **username_0**: This also happened on events which did not have online registration enabled  
  
  ---
  
  