Blackout Dates
RadDateTimePicker allows you to disable certain dates in the calendar part of the control. To do this, set the BlackoutDates property of RadDateTimePicker to a collection of DateTime objects.
RadDateTimePicker control uses RadCalendar to show its calendar. The feature shown in this article is the same as the blackout dates of RadCalendar.
In order for a date from the BlackoutDates collection to get disabled in the calendar, its time portion should be set to the start of the day (usually
00:00:00.00
which is 12:00:00AM). Otherwise, the date won't get reflected in the UI.
Setting BlackoutDates
This section shows how to set the BlackoutDates in code behind.
Example 1: Defining RadDateTimePicker
Example 2: Setting the BlackoutDates property in code behind
Data Binding BlackoutDates
This section shows how to data bind the BlackoutDates property.
Example 3: Setting up the model
Example 4: Setting the data context
Example 5: Data binding the BlackoutDates property
Find a runnable project that demonstrates how to use BlackoutDates in the online SDK repository.