Исправление ввода +1 при выборе даты из кнопок календаря
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user