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

# fields.date()

Date or date-time input, stored as an ISO-8601 string.

Date input. Maps to editor `{ name: 'str-input', type: 'date' }` (or `type: 'datetime-local'` when `withTime: true`). Output is always an ISO-8601 string — there's no native `Date` object, so the value round-trips through JSON cleanly.

## Example

```ts
fields.date({
  label: 'Published on',
})

fields.date({
  label: 'Event starts',
  withTime: true,
})
```

## Options

| Option         | Type      | Required | Description                                                                                                 |
| -------------- | --------- | -------- | ----------------------------------------------------------------------------------------------------------- |
| `label`        | `string`  | Yes      | Label shown to editors in Strife Studio.                                                                    |
| `description`  | `string`  | No       | Tooltip shown to editors.                                                                                   |
| `localizable`  | `boolean` | No       | When `true`, output is `Record<string, string>` instead of `string`.                                        |
| `searchable`   | `boolean` | No       | Include in the team's search index.                                                                         |
| `filterable`   | `boolean` | No       | Allow filtering content lists by this value.                                                                |
| `protected`    | `boolean` | No       | Restrict editing to users with the appropriate permission.                                                  |
| `propertyName` | `string`  | No       | Override the stored property name.                                                                          |
| `withTime`     | `boolean` | No       | When `true`, switches the editor to `datetime-local` (date + time, seconds included). Default is date-only. |

## Output type

`string` (ISO-8601), or `Record<string, string>` when `localizable: true`.

## See also

* [Date](https://strife.app/docs/reference/fields/date.md) / [Date Time](https://strife.app/docs/reference/fields/date-time.md) — the same editor, documented from the Strife Studio UI side.
