windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-calendarcontrolbase-5ce9c931.md
Gets or sets the edit value (current date). This value is in sync with the CalendarControlBase.EditValue property.
Namespace : DevExpress.XtraEditors.Controls
Assembly : DevExpress.XtraEditors.v25.2.dll
NuGet Package : DevExpress.Win.Navigation
[DXCategory("Appearance")]
public virtual DateTime DateTime { get; set; }
<DXCategory("Appearance")>
Public Overridable Property DateTime As Date
| Type | Description |
|---|---|
| DateTime |
The edit value.
|
See CalendarControlBase.EditValue to learn more.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the DateTime 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.
winforms-calendar-dateedit-cell-appearance-customization/CS/Calendar_CellStyleProvider/Form1.cs#L21
private void Form1_Load(object sender, EventArgs e) {
dateEdit1.DateTime = calendarControl1.DateTime = new DateTime(2016, 12, 31);
dateEdit1.Properties.CellStyleProvider = calendarControl1.CellStyleProvider = new CustomCellStyleProvider();
winforms-calendar-dateedit-cell-appearance-customization/VB/Calendar_CellStyleProvider/Form1.vb#L23
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
calendarControl1.DateTime = New Date(2016, 12, 31)
dateEdit1.DateTime = calendarControl1.DateTime
See Also