PdfTextFieldDateFormat Property |
Namespace: RadPdf.Data.Document.Objects.FormFields
If set to a non-empty string, this form field is formatted to contain a date.
In some PDF tools, this field will show a date picker popup when clicked.
The date format is defined using alphabetic characters as tokens, each representing values for the following:
Day - either in a shortened version or fully spelled out
Month - either in a shortened version or fully spelled out
Year - two or four digits
| Format token - Description | Example |
|---|---|
| d - The day of the month between 1 and 31. | "1" to "31" |
| dd - The day of the month with leading zero if required. | "01" to "31" |
| ddd - Abbreviated day name. | "Mon" to "Sun" |
| dddd - The full day name. | "Monday" to "Sunday" |
| m - The month of the year between 1-12. | "1" to "12" |
| mm - The month of the year with leading zero if required. | "01" to "12" |
| mmm - Abbreviated month name. | "Jan" to "Dec" |
| mmmm - The full month name. | "January" to "December" |
| yy - The year as a two-digit number. | "99" or "15" |
| yyyy - The full four digit year. | "1999" or "2015" |
In addition to the date formatting tokens, there are seven separators that can be used to form a date expression that separates the several values of the date.
| Character - Description | Format example -> Final document rendering |
|---|---|
| , - Comma | mm,dd,yyyy -> 06,13,1997 |
| . - Period / Dot | mmm.dd yyyy -> Jun.13 1997 |
| / - Forward slash | mm/dd/yyyy -> 06/13/1997 |
| \\ - Double backslash | mm\\dd\\yyyy -> 06\13\1997 (Note that the double backslash is used to format the date, but the printed value only contains one backslash.) |
| - - Dash / Hyphen | mm-dd-yyyy -> 06-13-1997 |
| : - Colon | mm:dd:yyyy -> 06:13:2023 |
| - Space | dddd mmmm d yyyy -> Friday June 13 1997 |