Skip to main content
A newer version of this page is available. .

CalendarControlBase.EditValue Property

Gets or sets the edit value (current date).

Namespace: DevExpress.XtraEditors.Controls

Assembly: DevExpress.XtraEditors.v18.2.dll

Declaration

[Bindable(true)]
[DXCategory("Data")]
public object EditValue { get; set; }

Property Value

Type Description
Object

The current date.

Remarks

Note

Using the EditValue and CalendarControlBase.DateTime properties makes sense in single selection mode. In multi-select mode (see CalendarControlBase.SelectionMode), the EditValue and CalendarControlBase.DateTime properties are not updated when a date range is selected.

You can bind the EditValue property (or the CalendarControlBase.DateTime property, which is in sync with the EditValue property) to a database field, and thus allow an end-user to edit this field by clicking a date in the Calendar Control. In single date selection mode (see CalendarControlBase.SelectionMode), the selected date is saved in the EditValue property.

The EditValue property is of the object type. The CalendarControlBase.DateTime property, which is in sync with the EditValue property, is of the DateTime type. When the EditValue property is set to null or to a value that cannot be converted to a valid DateTime value, the CalendarControlBase.DateTime property is automatically set to CalendarControlBase.NullDate.

If the CalendarControlBase.SyncSelectionWithEditValue option is enabled and the EditValue/CalendarControlBase.DateTime property is changed, the selection is automatically set to the new date specified by the CalendarControlBase.DateTime property.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the EditValue property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also