Skip to content

uiGridConstants.filter.CONTAINS not working for date filters #3807

@JayHuang

Description

@JayHuang

Filing a new issue as closed PRs don't give notifications.

This is a reference to this PR: #2772

The following code:

    if (filter.flags.date === true) {
      value = new Date(value);
      // If the term has a dash in it, it comes through as '\-' -- we need to take out the '\'.
      term = new Date(term.replace(/\\/g, ''));
    }

only executes if condition is not uiGridConstants.filter.STARTS_WITH, ENDS_WITH, CONTAINS, or EXACT.

However, in the case of a user typing dates into a column filter, it's very common for them to type a partial match of the date. Date comparisons only being restricted to GREATER_THAN, GREATER_THAN_OR_EQUAL, LESS_THAN, LESS_THAN_OR_EQUAL is not sufficient.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions