Back to Devexpress

DateEdit.DefaultDateTime Property

wpf-devexpress-dot-xpf-dot-editors-dot-dateedit-ce95be5a.md

latest1.9 KB
Original Source

DateEdit.DefaultDateTime Property

Gets or sets the value displayed in the empty editor when a user starts to enter data. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public DateTime? DefaultDateTime { get; set; }
vb
Public Property DefaultDateTime As Date?

Property Value

TypeDefaultDescription
Nullable<DateTime>DateOnly value equal to DateTime.Today

The value displayed in the empty editor when a user starts to enter data.

|

Remarks

The DateEdit uses the DefaultDateTime property if the editor’s value is empty and a user interacts with the editor in the following ways:

  • A user starts to type a value: the editor uses the default date to suggest an auto-complete option.

  • A user opens the drop-down calendar: the editor auto-selects the default date.

  • XAML

xaml
<dxe:DateEdit DefaultDateTime="#2007-07-07#"/>

The DefaultDateTime property does not affect the value returned by the empty editor. Use the BaseEdit.NullValue property to specify the editor value when its value is null.

See Also

DateEdit Class

DateEdit Members

DevExpress.Xpf.Editors Namespace