Skip to content
Strife Docs

Reference Field Reference

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

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

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

Options

OptionTypeRequiredDescription
label
string
Yes
Label shown to editors in Strife Studio.
description
string
No
Not shown in Studio's editor panel.
localizable
boolean
No
When true, output is Record<string, string> instead of string.
searchable
boolean
No
Stored on the template; nothing uses it today.
filterable
boolean
No
Stored on the template; nothing uses it today.
protected
boolean
No
Stops the field from being edited or removed in Studio's template designer. No effect in the editor panel.
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 / Date Time — the same editor, documented from the Strife Studio UI side.