Исправление ввода +1 при выборе даты из кнопок календаря

This commit is contained in:
brusnitsyn
2026-07-24 17:02:27 +09:00
parent d80068bcd6
commit 904d56a787
2 changed files with 5 additions and 5 deletions

View File

@@ -153,7 +153,7 @@ const shortcuts = {
'Вчера': () => getPreviousShift(),
'За 7 дней': () => {
const currentShift = getCurrentShift()
const end = currentShift[1]
const end = new Date() //currentShift[1]
const start = new Date(end)
start.setDate(start.getDate() - 7)
start.setHours(9, 0, 0, 0)
@@ -161,7 +161,7 @@ const shortcuts = {
},
'За 30 дней': () => {
const currentShift = getCurrentShift()
const end = currentShift[1]
const end = new Date() //currentShift[1]
const start = new Date(end)
start.setDate(start.getDate() - 30)
start.setHours(9, 0, 0, 0)
@@ -169,7 +169,7 @@ const shortcuts = {
},
'Текущий год': () => {
const currentShift = getCurrentShift()
const end = currentShift[1]
const end = new Date() //currentShift[1]
const start = new Date(end.getFullYear(), 0, 1)
start.setHours(9, 0, 0, 0)
return [start, end]