Back to Devexpress

RepositoryItemDateEdit.DateOnError Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitemdateedit-234730d1.md

latest3.5 KB
Original Source

RepositoryItemDateEdit.DateOnError Property

OBSOLETE

This property is obsolete.

Specifies how a DateEdit responds to an attempt to enter an invalid date value.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[Browsable(false)]
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This property is obsolete.")]
public virtual DateOnError DateOnError { get; set; }
vb
<Browsable(False)>
<Obsolete("This property is obsolete.")>
<EditorBrowsable(EditorBrowsableState.Never)>
Public Overridable Property DateOnError As DateOnError

Property Value

TypeDescription
DateOnError

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

|

Available values:

NameDescription
Undo

Invalid data is replaced with the previously validated date.

| | Today |

Invalid data is replaced with the current date.

| | NullDate |

Invalid data is replaced with the value of the RepositoryItemDateEdit.NullDate property.

|

Remarks

This property is obsolete.

When an editor’s mask type is set to MaskType.DateTime or MaskType.DateTimeAdvancingCaret, a date editor prevents an end-user from entering an invalid date-time value. Only a valid date-time value that matches the pattern specified by the RepositoryItemDateEdit.EditMask property can be entered.

When an editor’s mask type is set to MaskType.None, the editor allows an end-user to enter any text (not only strings corresponding to date/time values). A date editor will make an attempt to convert the entered text to a date/time value. If the text cannot be converted the editor’s edit value will be set to null. To implement a custom conversion algorithm handle the RepositoryItem.ParseEditValue event.

See Also

EditValue

AllowNullInput

NullDate

Input Mask

RepositoryItemDateEdit Class

RepositoryItemDateEdit Members

DevExpress.XtraEditors.Repository Namespace