Skip to main content

DateEditProperties.DateOnError Property

Gets or sets a value that specifies how the date editor responds to an invalid date being entered by an end user.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web


public DateOnError DateOnError { get; set; }

Property Value

Type Default Description
DateOnError Undo

A DateOnError value specifying how to respond to an invalid date value being entered.

Available values:

Name Description

An invalid date is replaced with the previously validated date.


An invalid date is replaced with the null value.


An invalid date is replaced with the current date.


End users are allowed to enter text that represents the required date into a date edit control’s edit box. Each time a date editor performs validation (i.e. when the editor is about to lose focus) the entered text is converted into the appropriate date/time type. If the conversion fails the date provided by the DateOnError property is assigned to the editor.

Use the DateOnError property to specify what should be substituted in place of an invalid value. It is possible to revert to the previous value (the last valid value), set the editor’s value to the current date or to a null value. See the DateOnError type for the available options.


The DateOnError property synchronizes its value with the editor’s ASPxDateEdit.DateOnError property.

See Also