This is a migrated thread and some comments may be shown as answers.

FilterDescriptor lte operator for dates is not working?

0 Answers 44 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Dimitris
Top achievements
Rank 1
Veteran
Dimitris asked on 02 Dec 2020, 11:27 AM

Hi 

 

I was checking this https://www.telerik.com/kendo-angular-ui/components/data-query/api/FilterDescriptor/#toc-ignorecase and tried to use the gte on my filters like in the following example:

 public onFilter(inputValue: string): void {
        this.gridView = process(this.gridData, {
            filter: {
                logic: 'or',
                filters: [
                    {
                        field: 'mainDate',
                        operator: 'gte',
                        value: inputValue
                    },
                    {
                        field: 'otherDate',
                        operator: 'gte',
                        value: inputValue
                    }
                ],
            }
        }).data;

 

My dates are all formatted in the European date format using a pipe like this in the template:

<ng-template kendoGridCellTemplate let-dataItem>
        {{ dataItem[col.field] | date:'dd/MM/yyyy'}}
</ng-template>

but when I am trying to search for a date ex: 21/05/2010 the data are not filtered on mainDate and otherDate dates greater than 21/05/2010. I am not getting any kind of JS error, but the grid is getting empty, like it doesn't find anything mathcing the filter.

If it's not clear, I could try to make an example on stackblitz.

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Dimitris
Top achievements
Rank 1
Veteran
Share this question
or