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

Trouble With Datetimepicker on Grid Filter

1 Answer 129 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 02 Feb 2015, 11:52 PM
Hi, here is my sample page: http://grumpydesign.com/kendo/date-filter.html

I have 2 issues.

1. How do I customize the filter to just have a date range?

Something like: "between [date] and [date]"

Second, even the filter that's there is not working, I think it's because my JSON is returning the data as a date object, and then I convert it into a string.

I'm totally confused, help!

William

1 Answer, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 04 Feb 2015, 01:44 PM
Hi William,

This behavior is not supported out of the box, however you can achieve similar results using a custom solution. Here is an example illustrating how the filterMenuInit event can be used to change the default operators. You can modify it further by using "Is after or equal to" and "Is before or equal to" operators. I've also noticed that the field is of type string, which prevents the Grid from showing the correct operators. I would suggest using a Date type for the field in the DataSource's schema.model option.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Date/Time Pickers
Asked by
William
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Share this question
or