Filterable Date Range

7 posts, 0 answers
  1. Craig
    Craig avatar
    35 posts
    Member since:
    Feb 2012

    Posted 06 Feb 2013 Link to this post

    Hi there,
    I am trying to figure out how to create a filter based on a Date Range with the Kendo Grid?
    I can't seem to find an example of this so I was hoping somebody might be able to help me.

    Thanks in Advance
  2. Craig
    Craig avatar
    35 posts
    Member since:
    Feb 2012

    Posted 06 Feb 2013 Link to this post

    Oops I was able to figure this out after some digging around. Thanks!
  3. Kendo UI is VS 2017 Ready
  4. Jackelin España
    Jackelin España avatar
    2 posts
    Member since:
    Jan 2013

    Posted 06 Feb 2013 Link to this post

    Like your solves? example please.
  5. Bharat
    Bharat avatar
    5 posts
    Member since:
    Apr 2014

    Posted 01 Oct 2014 Link to this post

    How can I Create a date range filter on one column and "Starts with" , "Is equal to" filter on another column for the same Grid in RAZOR
  6. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 03 Oct 2014 Link to this post

    Hi Bharat,

    If I understand you correctly you would like to customize the filter menu in the Kendo UI Grid. If this is the case then I suggest you to check the following demo that shows how to create separate filter for each column:

    http://demos.telerik.com/kendo-ui/grid/filter-menu-customization

    In case you have any further questions, then please open a separate support request with some more detailed information and we will be happy to help.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  7. Bharat
    Bharat avatar
    5 posts
    Member since:
    Apr 2014

    Posted 06 Oct 2014 in reply to Kiril Nikolov Link to this post

    Thanks for the reply Kiril.  This is not what I meant. As you can see in this code I have done  .Extra(true)
    . This gives me two set of filters on  column Name. First filter (Starts with)  AND/OR second filter (Starts with) (name starts with a AND starts with b)   here I want only one set of filter. This can be archived by making .Extra(False). Good so far. But the problem is when on the same grid I put filter on the date column.  .Extra(false) will also take away second set of filter from the date column where as in date column I want two set of filter to select the date range (Date after ....  and... date Before ...)



     .Refresh(true))
                                                .Filterable(filterable => filterable
                                                .Extra(true)
                                                        .Operators(operators => operators
                                                        .ForString(str => str.Clear()
                                                        .StartsWith("Starts with")
                                                        .IsEqualTo("Is equal to")
                                                        .IsNotEqualTo("Is not equal to")
                                                        ))
                                                )
                                             .DataSource(dataSource => dataSource
                                        .Ajax()
                                        .PageSize(15)
                                        .ServerOperation(false)
                                        .Read(read => read.Action("Shipment_Read_nw", "Home")))
                                        )
  8. Kiril Nikolov
    Admin
    Kiril Nikolov avatar
    2566 posts

    Posted 08 Oct 2014 Link to this post

    Hi Bharat,

    You can use the filterMenuInit event, where you can detect the column field for the date column and manipulate the filters there. Like for example:

    http://dojo.telerik.com/AGUxa

    If this does not resolve the issue, then please edit the provided example in order for us to better understand the problem.

    Regards,
    Kiril Nikolov
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready