Relative date not working in Filter by field

Created on 4 November 2021, over 2 years ago
Updated 9 November 2023, 8 months ago

Problem/Motivation

When filtering by a date field, a relative value such as "+0 days" return all nodes, and "-1 day" return no nodes: relative dates are not working

Steps to reproduce

Create a new node content type or add a date field to existing node content type;
Create one node with a date from last month; create another with today; create another with next month;
In "Filter by field" select this date field; In "Filter by field operator" select "greater then or equal"; in "Filter by field value" type either "+0 days" or "-1 day": with "+0 days" all nodes are returned and with "-1 day" no nodes are returned;

Proposed resolution

Check if "Filter by field" is a date field and create a date with associated text, such as "now", "tomorrow", "today +1 week"

Remaining tasks

User interface changes

API changes

Data model changes

✨ Feature request
Status

Fixed

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡·Brazil allanforms

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024