From c3f66ebaa8a2a9fbf0f4aa467952a7ec0a889b25 Mon Sep 17 00:00:00 2001 From: Dean Date: Mon, 4 Apr 2022 14:55:43 +0100 Subject: [PATCH] Removed step that alters the picker date on change for time only fields --- packages/bbui/src/Form/Core/DatePicker.svelte | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/bbui/src/Form/Core/DatePicker.svelte b/packages/bbui/src/Form/Core/DatePicker.svelte index d2a407d546..fd67fa41bb 100644 --- a/packages/bbui/src/Form/Core/DatePicker.svelte +++ b/packages/bbui/src/Form/Core/DatePicker.svelte @@ -54,10 +54,9 @@ if (newValue) { newValue = newValue.toISOString() } - // if time only set date component to today + // if time only set date component to 2000-01-01 if (timeOnly) { - const todayDate = new Date().toISOString().split("T")[0] - newValue = `${todayDate}T${newValue.split("T")[1]}` + newValue = `2000-01-01T${newValue.split("T")[1]}` } dispatch("change", newValue) }