# `date` — behaviour

*Open when placing a date/time field, when the user names a selectable window, or when choosing between `date` and `datePicker`.*

A picker, not a text input. `typeDate` decides what the value IS; `typeDisplayDate` and `options.dateFormat` change only what is shown and never the stored value.

`typeDate` is the element's own setting — it is not derived from the bound column and nothing compares the two. An entity date column carries its own granularity (`subType` `date` | `time`, absent = `timestamp`); choose `typeDate` to match it, or the field writes a shape the column never asked for.

Bind to `<variable>.<ownField>`. A path crossing a relation (`task.customer.birthday`) loads for display and is silently never written back on save.

**Windows.** `options.minDate` / `options.maxDate` are the only way to author a real window. The flags are relative to now only: `disableFuture` means "anything up to now", `disablePast` alone still allows every future date forever. An explicit bound outranks the flag on the same side, so an authored bound is never quietly moved to "now". Each takes a constant in the field's own shape or a `{{path}}` over form data, re-resolved whenever that data changes.

Two silent ways a window vanishes: an unparseable bound yields NO bound instead of an error, and inverted bounds (min > max — easy when both come from `{{…}}` fields) drop BOTH deliberately, leaving the field wide open. A numeric bound must be a ms timestamp of 10+ digits; `"2026"` is read as the year.

```jsonc
{ "type": "date", "typeDate": "date",
  "options": { "minDate": "{{booking.startDate}}", "maxDate": "2026-10-18" } }
```

`options.relativeTime` ("2 hours ago") applies in read mode only and overrides `dateFormat`; on an editable field it does nothing.

**vs `datePicker`.** That one is an always-open picker card bound through its own `startFieldPath`/`endFieldPath`, not `dataSource.fieldPath`, and it IGNORES `minDate`/`maxDate`/`readTemplate`/`readIcon`/`readColor` — its only bounds are `disablePast`/`disableFuture`. A hard window needs `date`.
