Commit 55089816 by Zheng Jie

[代码优化](v2.6):解决日期控制日期计算错误的Bug,修复日期控件点击无效Bug

close https://github.com/elunez/eladmin/issues/560
parent 5f64d7ea
......@@ -75,7 +75,7 @@ export const calendarMoveShortcuts = [{
let endTime = new Date(new Date().setHours(23, 59, 59))
if (!picker.value) {
picker.value = [startTime.daysAgo(new Date().getDay()),
startTime.daysAgo(new Date().getDay() + 1)]
endTime.daysAgo(new Date().getDay() + 1)]
} else {
picker.value = [picker.value[0].daysAgo(picker.value[0].getDay()),
picker.value[1].daysAgo(picker.value[1].getDay() + 1)]
......@@ -91,7 +91,7 @@ export const calendarMoveShortcuts = [{
let endTime = new Date(new Date().setHours(23, 59, 59))
if (!picker.value) {
picker.value = [startTime.daysAgo(new Date().getDay() - 7),
startTime.daysAgo(new Date().getDay() - 6)]
endTime.daysAgo(new Date().getDay() - 6)]
} else {
picker.value = [picker.value[0].daysAgo(picker.value[0].getDay() - 7),
picker.value[1].daysAgo(picker.value[1].getDay() - 6)]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment