Skip to content

Commit

Permalink
Calendar:fix not correct day of week when the day is Sunday (#15399)
Browse files Browse the repository at this point in the history
Calendar:fix not correct day of week when the day is Sunday
  • Loading branch information
QingDeng authored and island205 committed May 7, 2019
1 parent d482263 commit e0f42be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/calendar/src/date-table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit e0f42be

Please sign in to comment.