ASPxDateEdit Class

A date editor control.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll


public class ASPxDateEdit :


The ASPxDateEdit is a drop-down editor that provides the drop-down calendar and time editor.

The calendar allows end users to select dates and navigate through months and years. The ASPxDateEdit.Date property specifies the currently selected date. Change this property to raise the ASPxDateEdit.DateChanged event.

The editor's dropdown window contains two sections:

Create a Date Edit

Design Time

The ASPxDateEdit control is available on the DX.20.2: Common Controls toolbox tab in the Microsoft Visual Studio IDE.

Drag the control onto a form and customize the control's settings, or paste the control markup in the page's source code.


To properly function, DevExpress controls require that special modules, handlers and options are registered in the the Web.config file. Switch the Microsoft Visual Studio IDE to the Design tab to automatically update the Web.config file with the required DevExpress information.

<dx:ASPxDateEdit ID="dateEdit" runat="server" EditFormat="Custom" Date="2009-11-02 09:23" 
Width="190" Caption="ASPxDateEdit">
        <TimeEditProperties EditFormatString="hh:mm tt" />
        <FastNavProperties DisplayMode="Inline" />

Run Time

using DevExpress.Web;
protected void Page_Load(object sender, EventArgs e)
    ASPxDateEdit dateEdit = new ASPxDateEdit();
    dateEdit.ID = "ASPxDateEdit1";

    dateEdit.EditFormat = EditFormat.Custom;
    dateEdit.Date = DateTime.Today;
    dateEdit.Caption = "Test date edit";
    dateEdit.CalendarProperties.FastNavProperties.DisplayMode = FastNavigationDisplayMode.Inline;
    dateEdit.TimeSectionProperties.Visible = true;
    dateEdit.TimeSectionProperties.TimeEditProperties.EditFormatString = "hh:mm tt";
    dateEdit.DisplayFormatString = "dd/MM/yyyy hh:mm tt";

Shared Drop-Down Calendar

Use the PopupCalendarOwnerID property to share a date editor's popup calendar between several date editors. This allows you to decrease the rendered HTML size.

<dx:ASPxDateEdit ID="dtmDate1" runat="server" Date="2018-12-30" ...>

<dx:ASPxDateEdit ID="dtmDate2" runat="server" PopupCalendarOwnerID="dtmDate1">

<dx:ASPxDateEdit ID="dtmDate3" runat="server" PopupCalendarOwnerID="dtmDate1">

Null Prompt Text

The date editor displays a prompt text (NullText) when the editor's value is null and the editor is not focused. The prompt text disappears when the editor receives focus.

<dx:ASPxDateEdit ID="DateEdit" runat="server" NullText="mm/dd/yyyy" >

See demo

Edit Format

The EditFormat property allows you to specify how the editor displays its value in the edit box.

The ASPxDateEditor provides the following formats:


Affected Properties




EditFormat= "Date"





EditFormatString:="MMMM dd, yyyy hh:mm tt"
<dx:ASPxDateEdit ID="dateEdit" runat="server" EditFormat="Custom" Date="2009-11-02 09:23" >

See demo

Display Format

Use the DisplayFormatString property to specify a format pattern used to display the editor value when the control is in browse mode.

<dx:ASPxDateEdit ID="dateEdit" runat="server" DisplayFormatString="dd/MM/yyyy hh:mm tt" >

See demo

Masked Input

The ASPxDateEditor supports masked input (UseMaskBehavior). In this mode, the editor uses the EditFormatString property value as a mask.

<dx:ASPxDateEdit ID="dateEdit" runat="server" UseMaskBehavior="true" EditFormatString="MMMM dd, yyyy" >