Commit e0f42be5 authored by QingDeng's avatar QingDeng Committed by Zhi Cun

Calendar:fix not correct day of week when the day is Sunday (#15399)

Calendar:fix not correct day of week when the day is Sunday
parent d4822633
...@@ -117,7 +117,8 @@ export default { ...@@ -117,7 +117,8 @@ export default {
days = currentMonthRange.concat(nextMonthRange); days = currentMonthRange.concat(nextMonthRange);
} else { } else {
const date = this.date; const date = this.date;
const firstDay = getFirstDayOfMonth(date); let firstDay = getFirstDayOfMonth(date);
firstDay = firstDay === 0 ? 7 : firstDay;
const prevMonthDays = getPrevMonthLastDays(date, firstDay - 1).map(day => ({ const prevMonthDays = getPrevMonthLastDays(date, firstDay - 1).map(day => ({
text: day, text: day,
type: 'prev' type: 'prev'
......
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