Using Disable dates

2 posts, 0 answers
  1. Paul
    Paul avatar
    13 posts
    Member since:
    Sep 2015

    Posted 17 Feb 2016 Link to this post

    Hello everyone.


    I am using Telerik MVC Datepicker control to allow the user to select a date.

    My date range is between the beginning of 1997 to current day.

    The list of Valid dates are in a database and can be called via Stored Procedure.

    My current list of valid dates number about 3500 and most represent end of month dates (though not always).

    I want to disable all the other dates in my date picker so that the user only has access to dates that have data associated with them.

    Is there a way to use the DisableDates feature of the Datepicker to do this?




  2. Kiril Nikolov
    Kiril Nikolov avatar
    2596 posts

    Posted 19 Feb 2016 Link to this post

    Hello Corey,

    The disableDates config option takes a function that will be executed for every rendered day, so you can tell whether the date is disabled or not. You can use this function and manipulate the dates that the widget will show as disabled.

    Kiril Nikolov
    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
Back to Top