Articles in this section
Category / Section

How to create BlackoutDates in DateTimeEdit control?

1 min read

The BlackoutDates can be added in the calendar using BlackOutDates property.

BlackOutDates property is of type BlackDatesCollection which is used to set the range of Dates using BlackOutDatesRange property

This property contains the two value such as StartDate and EndDate.

StartDate – This property used to indicate the Starting range of Dates.

EndDate  - This property used to indicate the end range of Dates.

Please find the code for the same:


<syncfusion:CalendarEdit x:Name="pickCalendar"  HorizontalAlignment="Left"   Margin="10,10,0,0" VerticalAlignment="Top"  />




BlackoutDatesRange blackOutDays = new BlackoutDatesRange();
blackOutDays = new BlackoutDatesRange() { StartDate = new DateTime(2018, 08, 09), EndDate = new DateTime(2018, 08, 20) };




                                                   Fig i: Screenshot shows the Calendar with BlackOutDates

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment