Kendo Grid menu date => isEqual

2 Answers 100 Views
Filter  Grid Menu
Eti
Top achievements
Rank 1
Eti asked on 17 May 2021, 02:08 PM

i was testing the Column menu filter function. and noticed that for the dates specifically the dropdown menu for isEquals to does not return the date choosen even if it exist. i tried for a date after and before as well incase of time storing error like midnight but that wasn't it. However the "is Before and Equals to" and the "is After and Equals to" work for getting the equals date. 

is this a known issue or a bug? can i specifically remove that option from the drop down or make it not default is so how?

2 Answers, 1 is accepted

Sort by
1
Stefan
Telerik team
answered on 18 May 2021, 07:57 AM

Hello, Eti,

The isEqual operator compares the time as well, as each date has a time portion in it.

I made an example with the column menu, date filtering and it is working as expected:

https://stackblitz.com/edit/react-ggv2sw?file=app%2Fmain.jsx

If the dates have a time portion that has to be disregarded, we can suggest programmatically setting it to 00:00:00 when the conversion from the ISO dates to JS dates is done.

Regards,
Stefan
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/.

Eti
Top achievements
Rank 1
commented on 09 Jun 2021, 05:16 PM

hey so we did it this was to ensure all except the mm-yy-dd are set to zeros. it didnt fix the problem. is there a particular way you recommend
0
Krissy
Telerik team
answered on 10 Jun 2021, 01:48 PM

Hello Eti,

I would recommend using the JavaScipt setHours() method to set the hours, minutes and seconds to 0 before passing the data to the Grid. I've created another example to showcase how to use this specific method: 
https://stackblitz.com/edit/react-ggv2sw-pw5jau?file=app%2Fmain.jsx 

Hope this can be useful for your application.

Regards,
Krissy
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
Filter  Grid Menu
Asked by
Eti
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Krissy
Telerik team
Share this question
or