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
pull/15178/head
QingDeng 2019-05-07 11:04:19 +08:00 committed by Zhi Cun
parent d4822633de
commit e0f42be5b0
1 changed files with 2 additions and 1 deletions

View File

@ -117,7 +117,8 @@ export default {
days = currentMonthRange.concat(nextMonthRange);
} else {
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 => ({
text: day,
type: 'prev'