From 926c2fdd9a928b759c94c02399a169ffb807a8da Mon Sep 17 00:00:00 2001 From: Denis Bykhov Date: Tue, 5 Dec 2023 12:26:02 +0600 Subject: [PATCH] Fix date input (#4141) Signed-off-by: Denis Bykhov --- packages/ui/src/components/calendar/DateInputBox.svelte | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/ui/src/components/calendar/DateInputBox.svelte b/packages/ui/src/components/calendar/DateInputBox.svelte index 63c49b4528..8534d71fc3 100644 --- a/packages/ui/src/components/calendar/DateInputBox.svelte +++ b/packages/ui/src/components/calendar/DateInputBox.svelte @@ -47,17 +47,16 @@ switch (id) { case 'day': date = new Date(timeZone ? moment(date).tz(timeZone).date(val).valueOf() : moment(date).date(val).valueOf()) - date.setDate(val) break case 'month': date = new Date( timeZone ? moment(date) .tz(timeZone) - .month(val + 1) + .month(val - 1) .valueOf() : moment(date) - .month(val + 1) + .month(val - 1) .valueOf() ) break