Back to Devexpress

DateNavigator.DisabledDates Property

wpf-devexpress-dot-xpf-dot-editors-dot-datenavigator-dot-datenavigator-95f3bf65.md

latest2.3 KB
Original Source

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.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public IList<DateTime> DisabledDates { get; set; }
vb
Public Property DisabledDates As IList(Of Date)

Property Value

TypeDescription
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

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

See Also

DateNavigator Class

DateNavigator Members

DevExpress.Xpf.Editors.DateNavigator Namespace