Centralize date input handling (#2214)¶
Problem¶
Editing a travel date directly in the module table (e.g. after adding a
plane/train entry) gave no hint of the expected date format, and typing an
invalid one produced an unclear error. The add-entry form already masked and
validated dates, but that logic was duplicated inline in ModuleForm.vue and
never applied to the table's inline edit path at all.
What shipped¶
PR #2256, "feat: centralize date input handling (#2214)", merged 2026-08-24
(e0b3cf99c).
frontend/src/utils/date.ts— new shared exports:DATE_INPUT_MASK('####/##/##'),matchesDateInputFormat(val)(regex-checksYYYY/MM/DD-shaped input,/,.or-separated), andisValidCalendarDate(val)(round-trips throughDateto reject invalid dates like Feb 30).frontend/src/i18n/common.ts— newdate_format_placeholderkey (YYYY/MM/DD/AAAA/MM/JJ).frontend/src/components/organisms/module/ModuleForm.vue— dropped its locally-duplicatedisValidCalendarDateand inline regex in favor of the shared utils, on bothgetDateRules()and a date-diff validator.frontend/src/components/organisms/module/ModuleTable.vue— the actual bug fix, since inline editing had no masking or validation before: adds:mask="DATE_INPUT_MASK"on date columns, agetColumnPlaceholder()that surfaces thedate_format_placeholderhint, and validates the committed value againstmatchesDateInputFormat/isValidCalendarDate— blocking the commit viasetError(row, col, ...)on a bad format or an invalid date.
No follow-up issues filed.