From 1129020159c8e8768e454adcf8a03e4fe46f33cc Mon Sep 17 00:00:00 2001 From: Michel Heusschen <59014050+michelheusschen@users.noreply.github.com> Date: Fri, 21 Jun 2024 22:05:17 +0200 Subject: [PATCH] fix(web): six digit year input (#10517) --- web/src/lib/components/elements/date-input.svelte | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/web/src/lib/components/elements/date-input.svelte b/web/src/lib/components/elements/date-input.svelte index ccd405c934..f42fff4359 100644 --- a/web/src/lib/components/elements/date-input.svelte +++ b/web/src/lib/components/elements/date-input.svelte @@ -5,7 +5,11 @@ type: 'date' | 'datetime-local'; } + export let type: $$Props['type']; export let value: $$Props['value'] = undefined; + export let max: $$Props['max'] = undefined; + + $: fallbackMax = type === 'date' ? '9999-12-31' : '9999-12-31T23:59'; // Updating `value` directly causes the date input to reset itself or // interfere with user changes. @@ -14,7 +18,9 @@ (updatedValue = e.currentTarget.value)} on:blur={() => (value = updatedValue)} on:keydown={(e) => {