Custom exposed filter for year in date field with ajax I am trying to create a custom exposed filter which would be a select field with years (2015-2025).
This would filter the result with the year of the date they are created.
I followed this tutorial https://www.flocondetoile.fr/blog/filter-content-year-views-drupal-8
But here there is no solution for ajax submission, so the page does not refresh and the filter does not apply.

Currently I have this year as a contextual filter and the form field in the hook_form_views_exposed_form_alter():

$options = [
    'all' =&gt; t('- All -'),
    '2015' =&gt; '2015',
    '2016' =&gt; '2016',
    '2017' =&gt; '2017',
    '2018' =&gt; '2018',
    '2019' =&gt; '2019',
    '2020' =&gt; '2020',
    '2021' =&gt; '2021',
    '2022' =&gt; '2022',
    '2023' =&gt; '2023',
    '2024' =&gt; '2024',
    '2025' =&gt; '2025',
  ];

  $form['year'] = [
    '#title' =&gt; t('By year'),
    '#type' =&gt; 'select',
    '#options' =&gt; $options,
    '#size' =&gt; NULL,
    '#default_value' =&gt; 'all',
  ];


Is there a possibility for the filter to work with ajax submission?
You can use this custom filter to filter by year:
https://github.com/DarkteK/d8-views-custom-filter/tree/master/d8_filters
Just change the years you want to use in the file 'ViewsYearsFilter.php'
This will work with Ajax