How to list events filtered by date In Drupal 8, I have an 'event' content type with a date range that specifies when the event starts and when it ends. In my view, I need to set up a filter with the following behavior: i choose a specific day from a calendar (btw how to create a calendar and make it work like a view filter in D8?!?), and the view only lists events that start &lt;= the specific day AND end >= the specific day.

Thanks in advance.
As jQuery UI is part of Drupal 8 core for the calendar functionality you can simply do this:

modulename.libraries.yml

modulename.id:
 version: VERSION
 js:
  js/custom.js: {}
 dependencies:
  - core/jquery
  - core/jquery.ui.datepicker


custom.js

function ($, Drupal) {
  "use strict";
  Drupal.behaviors.mymodule = {
    attach: function(context) {
      $('#views-exposed-form-id 
       input:text').datepicker();
     }
   };
})(jQuery, Drupal);


To query for data between event starts &amp; end date you can use hook_view_query_alter();

modulename.module

use \Drupal\views\Plugin\views\query\QueryPluginBase;
use \Drupal\views\ViewExecutable;

function modulename_views_query_alter(ViewExecutable $view, QueryPluginBase $query) {
if ( $view-&gt;id() !== "view_id" ) { return; }
 foreach ($query-&gt;where as &amp;$condition_group) { 
  foreach ($condition_group['conditions'] as $index =&gt; &amp;$condition) {
   if (!empty($view-&gt;exposed_raw_input['start']['min']) &amp;&amp; !empty($view-&gt;exposed_raw_input['start']['max'])) {
$query-&gt;addWhereExpression(0,'FROM_UNIXTIME(tablename.created, :format ) BETWEEN :min AND :max ',
array(':min' =&gt; $view-&gt;exposed_raw_input['start']['min'],':max' =&gt; $view-&gt;exposed_raw_input['start']['max'],':format' =&gt; '%m/%e/%Y'));
   }
  }
 }
}


Idea is to use BETWEEN :min AND :max in your query. Maybe there are other ways to solve this problem, but this is how I would approach this issue.