# Javascript: TXTextControl.DateField.preserveFormatting Property

> Specifies whether the field's formatting should be preserved.

- **Product:** DS Server
- **Section:** Reference
- **Kind:** Property
- **Introduced:** 25.0
- **Path:** DS Server > Reference > JavaScript API > Javascript: TXTextControl.DateField.preserveFormatting Property
- **177 words**
- **Web URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol-datefield/preserveformatting-property/
- **LLMs URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol-datefield/preserveformatting-property/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol-datefield/preserveformatting-property/llms-full.txt

---

### Description

Specifies whether the field's formatting should be preserved.

### Syntax

```javascript
<boolean> TXTextControl.DateField.preserveFormatting
```

### Examples

The following example demonstrates `TXTextControl.DateField.preserveFormatting` in a practical document-editing workflow. It specifies whether the field's formatting should be preserved.

```javascript
function inspectPreserveFormatting(dateField) {
    const preserveFormatting = dateField.preserveFormatting;
    console.log("preserve formatting:", preserveFormatting);
}
```

---

## Nearby

- **Previous:** [Javascript: TXTextControl.DateField.format Property](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol-datefield/format-property/llms-full.txt)
- **Next:** [Javascript: TXTextControl.DialogBoxKind Enumeration](https://docs.textcontrol.com/ds-server/reference/javascript/txtextcontrol/dialogboxkind-enumeration/llms-full.txt)
