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) {
|
switch (id) {
|
||||||
case 'day':
|
case 'day':
|
||||||
date = new Date(timeZone ? moment(date).tz(timeZone).date(val).valueOf() : moment(date).date(val).valueOf())
|
date = new Date(timeZone ? moment(date).tz(timeZone).date(val).valueOf() : moment(date).date(val).valueOf())
|
||||||
date.setDate(val)
|
|
||||||
break
|
break
|
||||||
case 'month':
|
case 'month':
|
||||||
date = new Date(
|
date = new Date(
|
||||||
timeZone
|
timeZone
|
||||||
? moment(date)
|
? moment(date)
|
||||||
.tz(timeZone)
|
.tz(timeZone)
|
||||||
.month(val + 1)
|
.month(val - 1)
|
||||||
.valueOf()
|
.valueOf()
|
||||||
: moment(date)
|
: moment(date)
|
||||||
.month(val + 1)
|
.month(val - 1)
|
||||||
.valueOf()
|
.valueOf()
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user