From 10994f27035535fa7d806ccf57ec5b9e76f55b8a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Thu, 5 Oct 2023 23:43:25 +0200 Subject: [PATCH] support clear on text input for date input --- .../components/apps/components/inputs/AppDateInput.svelte | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/apps/components/inputs/AppDateInput.svelte b/frontend/src/lib/components/apps/components/inputs/AppDateInput.svelte index 6984a2f2fd..96d63b89aa 100644 --- a/frontend/src/lib/components/apps/components/inputs/AppDateInput.svelte +++ b/frontend/src/lib/components/apps/components/inputs/AppDateInput.svelte @@ -53,7 +53,13 @@ } } - $: value && outputs?.result.set(formatDate(value, resolvedConfig.outputFormat)) + $: { + if (value) { + outputs?.result.set(formatDate(value, resolvedConfig.outputFormat)) + } else { + outputs?.result.set(undefined) + } + } function handleDefault(defaultValue: string | undefined) { value = defaultValue