diff --git a/frontend/src/lib/shared/primitives/DatePrecisionField.svelte b/frontend/src/lib/shared/primitives/DatePrecisionField.svelte index 36403ac4..9f54132b 100644 --- a/frontend/src/lib/shared/primitives/DatePrecisionField.svelte +++ b/frontend/src/lib/shared/primitives/DatePrecisionField.svelte @@ -16,7 +16,9 @@ import type { DatePrecision } from '$lib/shared/utils/documentDate'; * Exposed (shared contract — both WhoWhenSection and EventForm depend on it): * - dateIso, precision, endDateIso — $bindable; the parent's binding IS the * state (no redundant $state mirror). - * - dateInputName / endDateInputName — names of the hidden ISO inputs. + * - dateInputName / endDateInputName / precisionInputName — submitted field + * names; defaults match the document form (`metaDatePrecision`), the timeline + * form overrides precisionInputName to `precision`. * - initialDateIso / suggestedDateIso — seeding inputs (see onMount + $effect). * - dateTestId / precisionTestId / endDateInnerTestId — forwarded data-testid * attributes so existing WhoWhenSection selectors survive the extraction. @@ -28,6 +30,7 @@ let { endDateIso = $bindable(''), dateInputName = 'documentDate', endDateInputName = 'metaDateEnd', + precisionInputName = 'metaDatePrecision', initialDateIso = '', suggestedDateIso = '', dateLabel = m.form_label_date(), @@ -41,6 +44,7 @@ let { endDateIso?: string; dateInputName?: string; endDateInputName?: string; + precisionInputName?: string; initialDateIso?: string; suggestedDateIso?: string; dateLabel?: string; @@ -145,7 +149,7 @@ $effect(() => {