From aeaddc30a49e4260c8ba32c55d94879a96e2798f Mon Sep 17 00:00:00 2001 From: 18alantom <2.alan.tom@gmail.com> Date: Fri, 14 Jul 2023 11:27:59 +0530 Subject: [PATCH] fix: set time to 0 on date selection --- src/components/Controls/Date.vue | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Controls/Date.vue b/src/components/Controls/Date.vue index e664cf44..a8e8faf9 100644 --- a/src/components/Controls/Date.vue +++ b/src/components/Controls/Date.vue @@ -112,9 +112,11 @@ export default defineComponent({ if (!(target instanceof HTMLInputElement)) { return; } - this.showInput = false; + let value: Date | null = new Date(target.value); + value.setHours(0, 0, 0, 0); + if (Number.isNaN(value.valueOf())) { value = null; }