Back to Devexpress

ASPxDateEdit.Date Property

aspnet-devexpress-dot-web-dot-aspxdateedit.md

latest2.8 KB
Original Source

ASPxDateEdit.Date Property

Gets or sets the currently selected date.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(typeof(DateTime), "")]
public DateTime Date { get; set; }
vb
<DefaultValue(GetType(Date), "")>
Public Property [Date] As Date

Property Value

TypeDefaultDescription
DateTimeString.Empty

A DateTime value, representing the currently selected date.

|

Remarks

Use the Date property to specify the editor’s selected date. Changing this property affects the ASPxDateEdit.Value property of the date editor.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Date 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.

asp-net-web-forms-grid-initialize-editor-conditionally/CS/WebApplication_Grid/Templates/CustomEditItemTemplate.cs#L27

csharp
date.ID = "date";
date.Date = Convert.ToDateTime(dataValue);
container.Controls.Add(date);

asp-net-web-forms-grid-initialize-editor-conditionally/VB/WebApplication_Grid/Templates/CustomEditItemTemplate.vb#L28

vb
[date].ID = "date"
[date].Date = Convert.ToDateTime(dataValue)
container.Controls.Add([date])

See Also

Date Editor

ASPxDateEdit Class

ASPxDateEdit Members

DevExpress.Web Namespace