Tab
A newer version of this page is available. Switch to the current version.

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.v18.2.dll

Declaration

[DefaultValue(DateOnError.Undo)]
public DateOnError DateOnError { get; set; }
<DefaultValue(DateOnError.Undo)>
Public Property DateOnError As DateOnError

Property Value

Type Default Description
DateOnError

Undo

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

Remarks

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.

NOTE

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

See Also