datetime Field Type
type: 'datetime' marks a field as a combined date-and-time value. Pair it with renderAs: 'datetime' and parseMode: 'iso-datetime' (for ISO 8601 strings) to render locale-aware output. Supports relative time display and timezone control.
Core Examples
Basic Datetime Rendering
ISO datetime string rendered with parseMode: 'iso-datetime', timezone: 'utc', and formatPreset: 'medium'.
{
key: 'postedAt',
label: 'Posted At',
type: 'datetime',
renderAs: 'datetime',
renderAsOptions: { parseMode: 'iso-datetime', locale: 'en-US', timezone: 'utc', formatPreset: 'medium' },
}
Condition
Confirmed column only appears for Payroll Sync — the only row with a non-null confirmedAt value.
{
key: 'confirmedAt',
label: 'Confirmed',
type: 'datetime',
renderAs: 'datetime',
renderAsOptions: { parseMode: 'iso-datetime', locale: 'en-US', timezone: 'utc', formatPreset: 'medium' },
condition: (entity) => Boolean(entity.confirmedAt),
}
Field Options Reference
| Option | Type | Default | Effect |
|---|---|---|---|
key | string | required | Entity property to read the datetime value from. |
label | string | unset | Column header or card label. |
type | 'datetime' | — | Marks the field as a combined date-time value. Pair with renderAs: 'datetime'. |
renderAs | 'datetime' | unset | Required for formatted output. Without it, raw value renders as plain text. |
condition | (entity) => boolean | unset | Hides the field for rows where the function returns false. |
sortable | boolean | false | Enables column sorting. Sorts chronologically when parseMode is set. |
width | CSS length or number | unset | Sets column width in table mode. |
align | 'left', 'center', 'right' | 'left' | Text alignment in table mode. |
renderAsOptions for renderAs: 'datetime'
parseMode is required — without it the field renders 'Invalid'. All other display options (formatPreset, locale, timezone, relativeTime, showSeconds, hour12, formatOptions, etc.) are documented on the datetime Renderer page.
Caveats
parseModeis required. Without it, the field renders'Invalid'.parseMode: 'iso-datetime'expects a full ISO 8601 datetime string including time component (e.g.2026-05-29T08:15:10Z). A date-only string like2026-05-29will not parse — usetype: 'date'for date-only values.timezonecontrols the display timezone only — the value is always stored and parsed as UTC-relative.- The
fullpreset includes a timezone abbreviation (e.g.UTC,PDT). This requires thetimezoneoption to be set explicitly.
See Also
- datetime Renderer — full
renderAsOptionsreference - Temporal Fields Guide — cross-type contracts, sorting behavior, migration checklist
- date Field Type
- timestamp Field Type
- Item Config — item-level shape and layout contract
- Field Config