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.

CommentFileSizeAuthor
#2 date_filter-3243660-2.patch1.1 KBliquidcms
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

liquidcms created an issue. See original summary.

liquidcms’s picture

and the patch..

ChrisSnyder’s picture

Status: Active » Reviewed & tested by the community

  • liquidcms authored 1111cec on 2.x
    Issue #3243660 by liquidcms, chrissnyder: Schedule date does not appear...
ChrisSnyder’s picture

Status: Reviewed & tested by the community » Fixed
ChrisSnyder’s picture

Version: 8.x-1.x-dev » 2.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.