I'm finding a lot of resources for 7 but not much for Drupal 8.

I'm displaying a content type with a date field in a view. I'd like a drop-down that presents users with a list of years for filtering purposes.

When I add that field as a filter I'm presented with two options:

  1. A text input date, preferably in machine-readable format
  2. An offset from the current date, also text input

Neither of these are very useful in an exposed filter. Is there a way I can filter only on the year using a drop-down?

2 Answers 2


Perhaps not the most elegant, but I used the following on the date field:

Views date field filter settings


I think we should use the regular expression operator because it is easier to change the year: enter image description here

Or you can use Views year filter module

Not the answer you're looking for? Browse other questions tagged or ask your own question.