Drupal is a registered trademark of Dries Buytaert
Protected Pages 3.0.0 Major update available for module protected_pages (3.0.0). Commerce Core 3.3.8 Minor update available for module commerce (3.3.8). Search API HTML Element Filter 1.0.7 Minor update available for module search_api_html_element_filter (1.0.7). Layout Builder Reorder 2.0.1 Minor update available for module layout_builder_reorder (2.0.1). Ban 1.1.0 Minor update available for module ban (1.1.0). Field Formatter Range 2.0.0 Major update available for module field_formatter_range (2.0.0). Field Formatter Range 8.x-1.8 Minor update available for module field_formatter_range (8.x-1.8). UI Patterns (SDC in Drupal UI) 2.0.18 Minor update available for module ui_patterns (2.0.18). Search API Solr 4.3.11 Module search_api_solr updated after 14 months of inactivity (4.3.11). Provus Mega Menu Module provus_mega_menu crossed 1,000 active installs.

This module provides a Views filter for date fields that allows users to filter by year only, rather than the full date or relative to the current date. It supports various comparison operators and can optionally integrate with the Bootstrap Datepicker library for a user-friendly year selection interface.

This module add the possibility to expose date/date time filter with year (format CCYY) instead of using full date (format CCYY-MM-DD HH:MM:SS) or offset from the current time.

This module support Bootstrap Datepicker library

Configuration

This module has only one setting if you want to display your exposed filter with Bootstrap Datepicker library go to /admin/config/views-year-filter/settings check Use Bootstrap Datepicker, SAVE and Clear cache.

you will have Datepicker popup with only years as it shown in the last screenShot.

Note: This module support the following operators

  1. Less than
  2. Less than or equal to
  3. Equal to
  4. Not equal to
  5. Greater than or equal to
  6. Greater than
  7. Between

⚠️ Warning

This module conflicts with the Smart Date module because both implement hook_views_plugins_filter_alter.
If Smart Date is enabled, you must use its date filter with year granularity instead of the filter provided by this module.

As a result, when Smart Date is enabled, the date filter from this module will not appear as an option for your date fields.

Note: This applies only to Date-only fields, not DateTime fields or Search API date fields.

Activity

Total releases
2
First release
Feb 2025
Latest release
7 months ago
Releases (12 mo)
1
Maintenance
Active

Releases

Version Type Release date
2.1.7 Stable Nov 23, 2025
2.1.6 Stable Feb 22, 2025