Problem/Motivation

In Drupal 7 the granularity of date filters for views could be configured:

Screenshot of configurable date granularity on Views exposed filters in Drupal 7

As things are now, exposed filters for date fields allow a user to only enter an exact time (and if the operator is set to = then it will only match content with the exact time).

Proposed resolution

Allow granularity to be specified when configuring the views filter.

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
Screen Shot 2016-06-15 at 3.49.07 PM.png143.81 KBjhedstrom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhedstrom created an issue. See original summary.

sukanya.ramakrishnan’s picture

This would be a very important addition to D8 for us. Hope this gets added to core soon. Thanks jhedstrom for creating this issue!

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.0-beta1 was released on August 3, 2016, which means new developments and disruptive changes should now be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

bkosborne’s picture

So if a granularity of "day" is selected for a datetime, the idea is that views would not attempt to fill in a time to make a complete datetime, right? This is indeed very useful for creating an exposed date range filter, where you expose a filter for the start date and end date, and reveal any events that take place within those days. Right now you need to select a specific time in the exposed filter which is a pain.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.0-alpha1 will be released the week of January 30, 2017, which means new developments and disruptive changes should now be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

bkosborne’s picture

#2627512: Datetime Views plugins don't support timezones appears close to being committed and it refactors the date filter plugin, which this issue will need to modify. So best to wait until that is in before tackling this one.

generalconsensus’s picture

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

tacituseu’s picture

Status: Active » Closed (duplicate)