# DateFormField.Date Property

> Gets or sets the DateFormField's date.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 28.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl > DateFormField.Date Property
- **565 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/dateformfield/date-property/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/dateformfield/date-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/dateformfield/date-property/llms-full.txt

---

### Description

Gets or sets the DateFormField's date.

### Syntax

```csharp
public DateTime? Date { get; set; }
```

```vbnet
Public Property [Date] As DateTime?
```

### Examples

The following example adds a prefilled delivery-date field to a form by using `DateFormField.Date`.

```csharp
DateFormField dateFormField = new(DateTime.Today.AddDays(14), 0) { Name = "DeliveryDate" };
textControl.FormFields.Add(dateFormField);

dateFormField.Date = DateTime.Today;
if (dateFormField.Date != null)
{
    Console.WriteLine("Date Form Field: Date is available.");
}
```

```vbnet
Dim dateFormField As New DateFormField(Date.Today.AddDays(14), 0) With { .Name = "DeliveryDate" }
textControl.FormFields.Add(dateFormField)

dateFormField.Date = Date.Today
If dateFormField.Date IsNot Nothing Then
    Console.WriteLine("Date Form Field: Date is available.")
End If
```

### Remarks

The property is null when the DateFormField is empty.

---

## Nearby

- **Previous:** [DateFormField Constructor](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/dateformfield/constructor/llms-full.txt)
- **Next:** [DateFormField.DateFormat Property](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/dateformfield/dateformat-property/llms-full.txt)
