angular-ui/ui-grid
GitHub で見るuiGridConstants.filter.CONTAINS not working for date filters
Open
#3,807 opened on 2015年6月18日
good first issuetype: bug
説明
Filing a new issue as closed PRs don't give notifications.
This is a reference to this PR: https://github.com/angular-ui/ng-grid/pull/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.