# FormatType

Source: https://sdk.pdf.net/docs/v1/reference/FormatType



The syntax kind of a text field's value format (`FieldFormat`). A text widget's `format` prop is `null` for a plain text field, or `{ type, format }`, where `type` is a `FormatType` member telling how to interpret the `format` string. Set it with [useSetWidgetProps](https://sdk.pdf.net/docs/v1/reference/useSetWidgetProps); a multiline field ignores its format. See [Working with forms](https://sdk.pdf.net/docs/v1/guides/working-with-forms) for the usage.

| Member     | Value        | The `format` string                                                                                                                   |
| ---------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| `DateTime` | `'datetime'` | An Acrobat date format string, such as `mm/dd/yyyy` or `h:MM tt`. Covers date, time, and datetime fields: all three share the syntax. |

PDF has no date or time field types: applications model them as text fields whose scripts format the value. The SDK recognizes the formats that Acrobat generates without executing the scripts, so fields driven by hand-written scripts are not recognized and read as plain text fields.

