Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

CalendarControlBase.DisableCalendarDate Event

Allows you to disable certain dates to prevent them from being selected by an end-user.

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DXCategory("CustomDraw")]
public event DisableCalendarDateEventHandler DisableCalendarDate

#Event Data

The DisableCalendarDate event's data class is DevExpress.XtraEditors.Calendar.DisableCalendarDateEventArgs.

#Remarks

The DisableCalendarDate event allows you to disable specific dates/date ranges in the calendar to prevent them from being selected by an end-user. Disabled dates are painted with a strikethrough. You can provide custom appearance settings used to paint disabled dates with the CalendarControlBase.CalendarAppearance property.

When handling the DisableCalendarDate event, read the DisableCalendarDateEventArgs.Date property to determine the currently processed date and set the DisableCalendarDateEventArgs.IsDisabled property to true for those that should be disabled.

See Also