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

Disable all WeekDays and all Weekends

1 Answer 78 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Salman
Top achievements
Rank 1
Salman asked on 09 Jun 2013, 12:30 PM
Hi,
Can anyone let me know how to disable all the weekdays and all weekends in the telerik radDateTimePicker control?. A sample code snippet would really help.

Many Regards,
Salman Farrukh

1 Answer, 1 is accepted

Sort by
0
Kalin
Telerik team
answered on 13 Jun 2013, 09:07 AM
Hello Salman,

You could achieve the desired scenario using a custom template for the Calendar inside the DateTimePicker dropdown. You should create a custom DataTemplateSelector and implement the logic for disabling the desired days in its SelectTemplate method.

Please see the attached sample project for the exact approach.

Hope this helps.

Regards,
Kalin
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DatePicker
Asked by
Salman
Top achievements
Rank 1
Answers by
Kalin
Telerik team
Share this question
or