TX Text Control .NET Server

Date Property

Property|Introduced in 28.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

Description

Gets or sets the DateFormField's date.

Syntax

public DateTime? Date { get; set; }

Examples

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

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.");
}

Remarks

The property is null when the DateFormField is empty.

Further Reading