> From the [Strife developer docs](https://strife.app/docs/reference/fields/date-time). Every page is listed in [llms.txt](https://strife.app/docs/llms.txt).

# Date Time

The Date Time field allows users to input a date including time via a date picker. The selected date is stored as a string value in the database.

<figure><img src="https://strife.app/docs/assets/Screenshot%202023-10-18%20at%2015.23.07.png" alt="" width="375"><figcaption><p>Strife Studio screenshot of a Date Time field</p></figcaption></figure>

### Settings

The Date field does not feature any distinctive settings beyond the standard ones.

> [!NOTE]
> You can find a comprehensive list of all basic settings in the ['Overview' section](https://strife.app/docs/reference/fields.md).

### Define with JSON

When defining templates using JSON, this field is represented using:

* **Component Name:** `str-input`
* **Type:** `datetime-local`
* Reference ID: `str-input|datetime-local`

The settings above map into the `editor.attributes` object inside the JSON definition.

```json
{
  ...
  "editor": {
    "name": "str-input",
    "type": "datetime-local",
    "propertyName": "...",
    ...   
  },
  ...
}
```

### Live preview

`str-time` is the preferred Strife Web Component for a Date Time field, although any of the text or container components can also be used.

> [!NOTE]
> For more information on live preview and Strife Web Components, please refer to the [Live preview documentation](https://strife.app/docs/reference/live-preview.md).
