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

Disable selected date range in Date Picker

3 Answers 318 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Satabdi
Top achievements
Rank 1
Satabdi asked on 22 Sep 2014, 09:03 AM
Hi Team
Do we have any option to disable specified range of dates in kendo datepicker.As of now I can find "max" option which is hiding the dates as well. But I want to make the the dates disable.Example all the dates  before July 20 and after september 20 , should be disable and can not click at all.

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 22 Sep 2014, 11:05 AM
Hi Satabdi,

There is no option for disabling dates in the Kendo UI DatePicker, if you set the min and max configuration options the widget will hide all the dates that are not in the specified interval. You can create similar functionality by using the Kendo UI DatePicker template, where you can check for the date that is being rendered and if it does not match your requirements you can apply custom CSS class to hide/disable click. A demo for using templates is available here:

http://demos.telerik.com/kendo-ui/datepicker/template

Regards,
Kiril Nikolov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Satabdi
Top achievements
Rank 1
answered on 23 Sep 2014, 02:12 AM
Thanks Kiril. But in this example all birthdays are clickable and there is customized images added with dates using template.Looks like,  I have to disable the dates using css, there is no such option like jquery "maxDate" in kendo datepicker.

Regards
Satabdi
0
Kiril Nikolov
Telerik team
answered on 23 Sep 2014, 08:54 AM
Hello Satabdi,

As I said there is not such option built-in the Kendo UI DatePicker and you will need to add custom CSS in order to achieve the functionality that you are looking for. The demo that I showed just explains how to use Templates inside the widget.

Regards,
Kiril Nikolov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
General Discussions
Asked by
Satabdi
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Satabdi
Top achievements
Rank 1
Share this question
or