mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 11:50:56 +00:00
use the second day to protect the date popup against the effects of time zone changes. (#7567)
Signed-off-by: denis-tingaikin <denis.tingajkin@xored.com>
This commit is contained in:
parent
4214ace603
commit
f13469c052
@ -86,7 +86,9 @@
|
||||
}
|
||||
}
|
||||
const changeMonth = (date: Date): Date => {
|
||||
return new Date(date.getFullYear(), date.getMonth() + 1, 1)
|
||||
// We should use the second day to protect the result of the month-shifted against the effects of time zone changes.
|
||||
const secondDay = 2
|
||||
return new Date(date.getFullYear(), date.getMonth() + 1, secondDay)
|
||||
}
|
||||
|
||||
$: if (viewDate) viewDateSec = changeMonth(viewDate)
|
||||
|
Loading…
Reference in New Issue
Block a user