Types — date, datetime, time (live)
The default type.
date-selekt-type="datetime".type="time" + minute-step="5".Ranges — one input; the second value posts as a hidden <name>_to field
Constraints & states — min/max, readonly
date-selekt-min-date/-max-date take ISO dates or today±N.A native
readonly input shows the value, no picker.The rules
- A text input + the
date-selektattribute; init once withg.dateSelekt('[date-selekt]'). The DISPLAY follows the install's date/time format (the same oneg.formatuses); the submitted value is ISO — the API never sees display formats. - Picking the type:
date(default) for calendar dates;datetimewhen the HOUR matters (events, deadlines with time);timealone for schedules — setdate-selekt-minute-stepto the real granularity (5, 15…), never leave minute-precision on things booked by the quarter hour. - Ranges are ONE input with
date-selekt-range(works with all three types; the second value posts as a hidden<name>_tofield) — filters, reports, shifts. Two RELATED dates of a record (start/end columns) stay two single inputs. - Bound the pickable window with
date-selekt-min-date/-max-date(ISO ortoday±N) instead of validating after the fact. - Use it for every date the user picks; the native
type="date"is acceptable only in throwaway internal tools. - Docs:
templates/app/docs/libs/date-selekt.md; the full harness (all types, presets, formats): /tests/date-selekt.