Table of Contents
DisabledDates Property

Gets a collection of disabled date ranges.

Syntax
 public DateRangeCollection DisabledDates { get; set; }
Remarks

Use this property to specify a collection of disabled date in the calendar.

The following code demonstrates how to set this property in XAML:

XAML
<eo:Calendar.DisabledDates>
    <!--A DateRange that covers the whole year of 2011  -->
    <eo:DateRange StartDate="2011/1/1" EndDate="2011/12/31">
    </eo:DateRange>
    <!-- A DateRange that covers a single date -->
    <eo:DateRange StartDate="2012/3/1" />
</eo:Calendar.DisabledDates>

The following code demonstrates how to use this property in code:

//Add a DateRange that covers the whole year of 2011
Calendar1.DisabledDates.Add(new DateRange(new DateTime(2011, 1, 1), new DateTime(2011, 12, 31)));

//Add a DateRange that covers a single date
Calendar1.DisabledDates.Add(new DateTime(2012, 3, 1));
See Also