mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-25 01:39:53 +00:00
TSK-942: add hours to current time (#2837)
Signed-off-by: Vyacheslav Tumanov <me@slavatumanov.me>
This commit is contained in:
parent
7333e9fce7
commit
6077d564e9
@ -86,7 +86,9 @@
|
|||||||
<div
|
<div
|
||||||
class="btn"
|
class="btn"
|
||||||
on:click={() => {
|
on:click={() => {
|
||||||
const shiftedDate = new Date(currentDate.getTime() + value * base)
|
const abs = Math.abs(value)
|
||||||
|
let shiftedDate = new Date(currentDate.getTime() + value * base)
|
||||||
|
if (abs < DAY && abs >= HOUR) shiftedDate = new Date(Date.now() + value * base)
|
||||||
dispatch('change', shiftedDate)
|
dispatch('change', shiftedDate)
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
Loading…
Reference in New Issue
Block a user