ComponentOne CalendarView for WinForms
CalendarView for WinForms / Using Controls / CalendarView Features / Custom Dates / Disabled Dates
In This Topic
    Disabled Dates
    In This Topic

    Disabled dates are the ones that appear disabled and are not selectable at run-time.

    Add disabled dates at design-time through DateTime Collection Editor. For more information about adding disabled dates through DateTime Collection Editor, see Collection editors. To add disabled dates through code in CalendarView, set the DisabledDates property.

    The following image shows a disabled date in CalendarView.

    The following code snippet shows how to add a disabled date using the DisabledDates property in CalendarView.

    ' add a disabled date 
    C1CalendarView1.DisabledDates =
        New DateTime() {New DateTime(2017, 3, 20, 0, 0, 0, 0)}
    // add a disabled date 
    c1CalendarView1.DisabledDates = new DateTime[]
        new DateTime(2017, 3, 20, 0, 0, 0, 0)