From 4ac7d6b9df9b9135aec6140711ad44f74fc9e53b Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 6 Feb 2022 23:10:35 +0100 Subject: [PATCH] fix: don't reset flatpickr date --- src/components/date/datepickerWithRange.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/components/date/datepickerWithRange.vue b/src/components/date/datepickerWithRange.vue index 6caa24a1..8dae2331 100644 --- a/src/components/date/datepickerWithRange.vue +++ b/src/components/date/datepickerWithRange.vue @@ -115,11 +115,6 @@ function emitChanged() { }) } -function inputChanged() { - flatpickrRange.value = '' - emitChanged() -} - watch( () => flatpickrRange.value, (newVal: string | null) => { @@ -139,8 +134,8 @@ watch( emitChanged() }, ) -watch(() => from.value, inputChanged) -watch(() => to.value, inputChanged) +watch(() => from.value, emitChanged) +watch(() => to.value, emitChanged) function setDateRange(range: string[] | null) { if (range === null) {