From 22ea61207ae4c7bad38eb4e0a85eeadfb9e9137b Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 26 Jan 2026 00:18:26 +0000 Subject: [PATCH] fix: make DateInput reactive to external value changes and handle empty dateFormat - Convert to Svelte 5 syntax with $props(), $bindable(), $derived() - Add $derived() to recompute date when value changes externally - Handle empty string dateFormat by falling back to default - Remove sendUserToast from derived computation (caused state mutation error) Co-Authored-By: Claude Opus 4.5 --- frontend/src/lib/components/DateInput.svelte | 89 +++++++++++--------- 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/frontend/src/lib/components/DateInput.svelte b/frontend/src/lib/components/DateInput.svelte index f230be25b2..d634a149ae 100644 --- a/frontend/src/lib/components/DateInput.svelte +++ b/frontend/src/lib/components/DateInput.svelte @@ -1,41 +1,49 @@ -
- +
+ { - if (date) { - updateValue(date) + onchange={(e) => { + const newDate = e.currentTarget.value + if (newDate) { + updateValue(newDate) } else { value = null dispatch('change', value)