Drupal views UI, filter exposed, the date in collection field's content only by month and year (no day)

610 Views Asked by At

Is it possible to add an exposed filter with only month and years parameters ? When I add this filter, the user must choose the day, the month and the year. I don't want the "day option"

The format of my date field in the content is : Month Year. This field is contained in a collection fields. My content struture is like :

  • content

    -some field

    -some field

    -collection fields

    - date field (format : month year)
    
    - some field
    

    ...

1

There are 1 best solutions below

0
On

When you add a date field in the Filters section, you can select the "Filter granularity". Changing it to a month will cause the filter to only expect month and a year from the user, but not the day.