mirror of
https://github.com/hcengineering/platform.git
synced 2024-12-23 11:31:57 +03:00
Fix date input (#4141)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
54f19d4519
commit
926c2fdd9a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user