Kendo grid with date picker in rows update max valid

2 posts, 0 answers
  1. Noël Thoelen
    Noël Thoelen avatar
    10 posts
    Member since:
    May 2004

    Posted 06 Mar 2017 Link to this post

    Hello,

    I am having a kendo grid which is editable and the rows I am using the "DateTimeInGridEditor" template which has some settings as min and max values. This works as expected, however I want to change min max values as the values from the dates are changing, meaning that I want to have a timespan between them of x years or months.  I looked through the documentation and I do not find a way of doing this. From what I have experienced will mean that I will have to change the editor and make it all the way using javascript but I do not know how I can do this. Is there a sample available?

    Thanks in advance.

  2. Konstantin Dikov
    Admin
    Konstantin Dikov avatar
    2466 posts

    Posted 08 Mar 2017 Link to this post

    Hi Noël,

    For changing properties of the DatePicker editor dynamically (assuming this will be based on some other value of the data item) you could handle the Edit event of the Grid and get reference to the editor. Once you get reference to the API of the DatePicker you can use its max and min methods for changing the range:
    Note that within the Edit event you have access to the model and its values.


    Best Regards,
    Konstantin Dikov
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top