disableDates in custom edit template with data attributes

2 posts, 0 answers
  1. Iago
    Iago avatar
    13 posts
    Member since:
    Sep 2016

    Posted 18 May 2018 Link to this post


    I'm using a custom popup edit template for my grid where I'm using a datetimepicker with data attributes.

    I would like to use disableDates function to allow only a range between [PlannedFromTemp, PlannedToTemp], but until now I was not able to pass the "date" argument in the function as in the documentation here.


    How can I pass the "date" in my test function as in the documentation, but in my concrete custom template?

     <input id="Timefrom" name="Timefrom"
                   data-bind="value: Timefrom"
                   data-format="dd.MM.yyyy HH:mm"
                   data-disable-dates="#= test(date, PlannedFromTemp, PlannedToTemp) # " 


    Thank you in advance,



  2. Alex Hajigeorgieva
    Alex Hajigeorgieva avatar
    625 posts

    Posted 22 May 2018 Link to this post

    Hi, Iago,

    Unfortunately, using this syntax will not lead to the desired result. Instead, I would suggest using the edit event of the grid, where the model will be available and the setOptions() method of the Kendo UI DateTimePicker to calculate which dates should be disabled. I prepared an example which disables several dates based on the value of the model:


    I hope this helps, let me know if you have further questions.

    Kind Regards,
    Alex Hajigeorgieva
    Progress Telerik
    Try our brand new, jQuery-free Angular 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