How to filter date by using kendo grid conlumnMenu.

1 Answer 16 Views
Filter Grid
Daochuen
Top achievements
Rank 1
Iron
Veteran
Iron
Daochuen asked on 08 Dec 2021, 07:18 AM

Hello,

My MVC project used kendo grid control which contain date column.  It seems date filter does not work  - after I clicking Filter button as below Page refreshed without filter. Any suggestion? Thanks in advance.

 

 

in View:

...

 columns.Bound(model => model.HireDate).Width(120).Format("{0:yyyy/MM/dd}");

...

  .ColumnMenu(columnMenu => columnMenu.Enabled(true).Filterable(true).Sortable(false).ComponentType("modern"))

1 Answer, 1 is accepted

Sort by
0
Anton Mironov
Telerik team
answered on 13 Dec 2021, 07:41 AM

Hello Daochuen,

Thank you for the images, code snippets, and details provided.

The pointed issue is caused by the fact, the date in the column is actually using a time part. The filter is the date with time = 00:00:00.

In order to achieve the desired behavior, I would recommend trying the approach from the following article:

Give a try to the approach above and let me know if further assistance is needed.

Looking forward to hearing back from you.

Kind Regards,
Anton Mironov
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Tags
Filter Grid
Asked by
Daochuen
Top achievements
Rank 1
Iron
Veteran
Iron
Answers by
Anton Mironov
Telerik team
Share this question
or