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

DateNavigator.DisabledDates Property

Gets or sets a collection of dates that end-users are not allowed to select. This is a dependency property.

Namespace: DevExpress.Xpf.Editors.DateNavigator

Assembly: DevExpress.Xpf.Core.v24.2.dll

NuGet Package: DevExpress.Wpf.Core

#Declaration

public IList<DateTime> DisabledDates { get; set; }

#Property Value

Type Description
IList<DateTime>

A collection of disabled dates.

#Remarks

Note

Dates outside the MinValue and MaxValue span are disabled.

The code sample below demonstrates how to populate the DisabledDated collection with values.

View Example

<Window ...
  xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
  <dxe:DateNavigator x:Name="DateNav"/>
</Window>
DateTime date = new DateTime(2020, 4, 18, 23, 49, 0);
DateNav.DisabledDates.Add(date);
DateNav.DisabledDates.Add(DateTime.Now.AddDays(-1.0));

DateNavigator Appearance - MouseOverCell

See Also