Skip to main content
A newer version of this page is available. .

DateEdit Class

Represents a date editor with a dropdown calendar.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v19.1.dll

Declaration

public class DateEdit :
    PopupBaseEdit

Remarks

The DateEdit represents a control that combines the functionality of a single-line text editor, button editor and drop-down calendar. The editor’s drop-down window displays a single-month calendar that allows end users to select dates, and navigate through months and years. Specifying a date by selecting it on the calendar, or manual entry into the text box changes the editor’s edit value.

date-edit

The currently selected date is specified by the DateEdit.DateTime (and the editor’s BaseEdit.EditValue) property. Changing this property raises the BaseEdit.EditValueChanged event. The minimum and maximum allowed dates can be specified using the DateEdit.MinValue and DateEdit.MaxValue properties, respectively.

The DateEdit control uses the date-time masks to format its displayed value.

Tip

Use the editor’s BaseEdit.EditValue property to get or set the editor value instead of the DateEdit.DateTime property when you need to set the editor value to null or validate the editor value.

Example

<dxe:DateEdit  MinValue="02/28/2018" MaxValue="02/28/2019">
    <dxe:DateEdit.StyleSettings>
        <dxe:DateEditNavigatorStyleSettings/>
    </dxe:DateEdit.StyleSettings>
</dxe:DateEdit>

The following code snippets (auto-collected from DevExpress Examples) contain references to the DateEdit class.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also