The field for the column is a Date with time so when filtering with equal a date only value, none is found.
I tried the sample from [AG-Grid][1]
But it does not filter at all.
Any advice? I use AG-Grid community and react 32.0.2
Thank you
[1]: https://www.ag-grid.com/javascript-data-grid/filter-date/
The example https://www.ag-grid.com/javascript-data-grid/filter-date/ had a bug.
I changed it to :
const filterParamsDateOnly: IDateFilterParams = {
comparator: (filterLocalDateAtMidnight, cellValue) => {
const dateAsString = cellValue.toLocaleDateString('en-US');
if (dateAsString === null) return -1;
const cellDate = new Date(dateAsString);
if (filterLocalDateAtMidnight.getTime() === cellDate.getTime()) {
return 0;
}
if (cellDate < filterLocalDateAtMidnight) {
return -1;
}
if (cellDate > filterLocalDateAtMidnight) {
return 1;
}
return 0;
},
minValidYear: 2000,
inRangeFloatingFilterDateFormat: 'MM/DD/YYYY',
};
And it works Fine.