Show theme settings Shopping cart Download trialFree Trial
Change Theme Settings
Change Theme Settings
Themes
 
Show All Themes
v
...v

Date Edit

v
DisplayFormatString = "D"
v
NullText = "MM/dd/yyyy"
EditFormat = EditFormat.Custom
EditFormatString = "MMMM dd, yyyy"
v
UseMaskBehavior = true
EditFormat = EditFormat.Custom
EditFormatString = "MMMM dd, yyyy"
DisplayFormatString = "MMMM dd, yyyy"
v
UseMaskBehavior = true
EditFormat = EditFormat.Custom
EditFormatString = "dd/MM/yyyy hh:mm tt"
TimeSectionProperties.Visible = true;
TimeSectionProperties.Adaptive = true;
TimeEditProperties.EditFormat = EditFormat.Custom;
TimeEditProperties.EditFormatString = "hh:mm tt";


The DevExpress MVC Date Edit extension combines the functionality of a single-line text editor, button editor, dropdown calendar, and time editor.

Specifying a date and time (by selecting it on the calendar or by manually typing it into the text box) changes the editor's edit value. The Date property specifies the currently selected date.

The Properties.DisplayFormatString property is used to specify the format pattern used to display the editor's value within the edit box when the editor is not focused.

The Properties.NullText property allows you to display a prompt in the edit box. The prompt is displayed if the editor's value is null and the editor is not focused, and it disappears when the editor receives focus.

Set the Properties.UseMaskBehavior property to true to support the masked input in the MVC Date Edit extension. Masks can be defined via the Properties.EditFormatString property if the Properties.EditFormat property is set to Custom.

By default, the editor's dropdown displays a calendar that allows end-users to select dates and navigate through individual months and years. Additionally, the drop-down can display the time section if the Properties.TimeSectionProperties.Visible property is set to true. The time section displays the fully customizable clock and time editor. The time edit value can be formatted using a pattern specified via the Properties.TimeSectionProperties.TimeEditProperties.EditFormatString property.

Collapse/Expand
Local Copy of this Demo
To inspect the source code for this demo on your machine, you must first install our components via the DevExpress Component Installer.
You can open a local copy of this online demo directly from this webpage (if using v20.2.8, 21.1.4 or higher).
Open CS Solution
The source code files for this demo are installed (by default) in the following directory:
\Users\Public\Documents\DevExpress Demos XX.X\Components\ASP.NET\CS\MVCxDataEditorsDemos