Back to Devexpress

CalendarControlBase.DateTime Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-calendarcontrolbase-5ce9c931.md

latest3.2 KB
Original Source

CalendarControlBase.DateTime Property

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

Declaration

csharp
[DXCategory("Appearance")]
public virtual DateTime DateTime { get; set; }
vb
<DXCategory("Appearance")>
Public Overridable Property DateTime As Date

Property Value

TypeDescription
DateTime

The edit value.

|

Remarks

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

csharp
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

vb
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

EditValue

NullDate

CalendarControlBase Class

CalendarControlBase Members

DevExpress.XtraEditors.Controls Namespace