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

RepositoryItemDateEdit.DisabledDateProvider Property

Allows you to assign an ICalendarDisabledDateProvider object that can disable certain dates to prevent them from being selected by an end-user.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v24.2.dll

NuGet Package: DevExpress.Win.Navigation

#Declaration

[DefaultValue(null)]
[DXCategory("Appearance")]
public ICalendarDisabledDateProvider DisabledDateProvider { get; set; }

#Property Value

Type Default Description
DevExpress.XtraEditors.Controls.ICalendarDisabledDateProvider null

An object that can disable certain dates to prevent them from being selected by an end-user.

#Remarks

Disabled dates cannot be selected by an end-user in the editor’s drop-down or by typing them in the edit box.

You can disable certain dates by using one of the following approaches:

  • Handle the RepositoryItemDateEdit.DisableCalendarDate event
  • Implement an ICalendarDisabledDateProvider object, which marks specific dates as “disabled”, and assign this object to the DisabledDateProvider property.

Disabled dates are painted with a strikethrough. You can provide custom appearance settings used to paint disabled dates with the RepositoryItemDateEdit.AppearanceCalendar property.

If a disabled date is entered in the edit box and focus is about to be moved away to another control, an error occurs, which is indicated by an error icon. You can respond to this error by handling the BaseEdit.InvalidValue event. In container controls (e.g., GridControl and TreeList), handle the InvalidValueException event provided by these controls (e.g., BaseView.InvalidValueException and TreeList.InvalidValueException).

See Also