SupportedDateFormats Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets an array of format picture strings which can be used to format the date. The returned format strings depend on the culture set for the date field's text. A TextControl uses Day, Month, Year, and Era Format Picture strings to format a date.
Syntax
public string[] SupportedDateFormats { get; }Public ReadOnly Property SupportedDateFormats As String()Examples
The following example adds a prefilled delivery-date field to a form by using DateFormField.SupportedDateFormats.
DateFormField dateFormField = new(DateTime.Today.AddDays(14), 0) { Name = "DeliveryDate" };
textControl.FormFields.Add(dateFormField);
foreach (string text in dateFormField.SupportedDateFormats)
{
Console.WriteLine(text.Length);
}Dim dateFormField As New DateFormField(Date.Today.AddDays(14), 0) With { .Name = "DeliveryDate" }
textControl.FormFields.Add(dateFormField)
For Each text As String In dateFormField.SupportedDateFormats
Console.WriteLine(text.Length)
Next