Trouble With Datetimepicker on Grid Filter

2 posts, 0 answers
  1. William
    William avatar
    2 posts
    Member since:
    Mar 2013

    Posted 02 Feb 2015 Link to this post

    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
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1416 posts

    Posted 04 Feb 2015 Link to this post

    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!
     
  3. Kendo UI is VS 2017 Ready
Back to Top