Problem/Motivation
I had to do some digging to see that this isn't technically a bug in this module so much as it is a bug in Drupal core. I don't claim to completely understand, but my take on this is:
Drupal 8 has taken a major step backwards in date handling, expecially for Date Ranges. Although Daterange fields added through the UI show in Views as proper date filters; when a daterange field is added through code to a custom entity; it appears to Views as a string field as far as filtering. #2848908: Views treats datetime fields like strings when filtering
There is a work around as it may be years before Drupal core gets this fixed. I'll submit a patch in the next comment.
Steps to reproduce
Proposed resolution
Add well known work around to basically override the default string handling that gets assigned to the field as a Views filter - and force it to be a date filter.
Remaining tasks
Tests?
User interface changes
This change will provide the proper date filter options such as >, <, between, etc.
API changes
None.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#2 | date_filter-3243660-2.patch | 1.1 KB | liquidcms |
Comments
Comment #2
liquidcms CreditAttribution: liquidcms commentedand the patch..
Comment #3
ChrisSnyderComment #5
ChrisSnyderComment #6
ChrisSnyder