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

Date filter issues

1 Answer 134 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pablo Tola
Top achievements
Rank 2
Pablo Tola asked on 03 Dec 2020, 06:44 PM

Using the built in date filter is not serializing properly.

When the API receives the request I get a 500 error.

Looking at the serialized filter I think the format is wrong:

?page=1&pageSize=10&filter=creationTime~gte~datetime%272020-12-01T19-00-00-05-0%27

this is how I build the query string:

const queryStr = `${toDataSourceRequestString(state)}`;

1 Answer, 1 is accepted

Sort by
0
Svet
Telerik team
answered on 07 Dec 2020, 10:21 AM

Hi Pablo,

Thank you for the provided information,

I checked the functionality of the toDataSourceRequestString() method in the following example:

https://stackblitz.com/edit/angular-pggbny?file=app/app.component.ts

and it converts any date filters that are available in the Grid state in the following proper format:

filter=FirstOrderedOn~gte~datetime'2020-12-07T00-00-00'&page=1&pageSize=5

Thus I can confirm that the toDataSourceRequestString() method functions properly. What I can suggest is to make sure that you are using the latest official version of the kendo data query package 1.5.4:

https://www.telerik.com/kendo-angular-ui/components/data-query/changelog/

I hope this helps. Please let me know in case I cam missing something.

Regards,
Svetlin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Pablo Tola
Top achievements
Rank 2
Answers by
Svet
Telerik team
Share this question
or