mirror of https://github.com/ElemeFE/element
Calendar:fix not correct day of week when the day is Sunday (#15399)
Calendar:fix not correct day of week when the day is Sundaypull/15178/head
parent
d4822633de
commit
e0f42be5b0
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue