This is a migrated thread and some comments may be shown as answers.

Using Disable dates

1 Answer 53 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
Paul
Top achievements
Rank 1
Paul asked on 17 Feb 2016, 09:23 PM

Hello everyone.

Setup

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?

 

Thanks

Corey

1 Answer, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 19 Feb 2016, 09:49 AM
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.

Regards,
Kiril Nikolov
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
Tags
Date/Time Pickers
Asked by
Paul
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Share this question
or