Kendo Grid Column Date Range Filter - JS

2 posts, 0 answers
  1. Ben
    Ben avatar
    1 posts
    Member since:
    Jan 2016

    Posted 27 Apr Link to this post

    Hello, I'm trying to create a date range picker for a column in a kendo grid that will also use the datepicker UI. Running into a lot of issues here.

    I have a JSON file that I am using as a datasource. I'm converting each date string into a date object.

    Sorting seems to work on this column, but I'm having issues with any kind of gte/lte operators, they don't seem to work at all.

    This is the config I have for the specific column, I'm not very familiar with Kendo and haven't found a forum that uses Kendo grid with pure javascript that utilizes a date range picker on just one column. Any help would be much appreciated, thanks!

    {

                             field: '["Status Date"]',

                            title: "Status Date",
                            type: "date",
                            format: "{0: MM/dd/yyyy}",
                            filterable: {
                                operators: {
                                    string: {
                                        lt: "Is before",
                                        gt: "Is after"
                                    }
                                },
                                ui: function(element) {
                                    element.kendoDatePicker({
                                        format: "{0: MM/dd/yyyy}",
                                    });
                                },
                                extra: true,
                                 messages: {
                                     "info": "Show items between dates:"
                                 }
                            }
                        }

  2. Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 29 Apr Link to this post

    Hello,

    As far as I understand your scenario, it seems similar to the one described in the following forum thread. In the last post, my colleague provides a live sample, which shows how you could filter a range with 2 pickers.

    I hope this implementation will help you to achieve the desired behavior. If you have any questions on the implementation, I would suggest you to address them in the other thread, in order to keep them in the same context.

    Regards,
    Dimitar
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for ASP.NET MVC is VS 2017 Ready
Back to Top