diff --git a/src/vue-cal/index.vue b/src/vue-cal/index.vue index c76d4c6f..a6a46a3b 100644 --- a/src/vue-cal/index.vue +++ b/src/vue-cal/index.vue @@ -1592,7 +1592,7 @@ export default { const weekDays = this.weekDays cells = weekDays.map((cell, i) => { - const startDate = ud.addDays(firstDayOfWeek, this.startWeekOnSunday ? i - 1 : i) + const startDate = ud.addDays(firstDayOfWeek, this.startWeekOnSunday && this.hideWeekends ? i - 1 : i) const endDate = new Date(startDate) endDate.setHours(23, 59, 59, 0) // End at 23:59:59. const dayOfWeek = (startDate.getDay() || 7) - 1 // Day of the week from 0 to 6 with 6 = Sunday. diff --git a/src/vue-cal/weekdays-headings.vue b/src/vue-cal/weekdays-headings.vue index 2db28346..0e6df6fa 100644 --- a/src/vue-cal/weekdays-headings.vue +++ b/src/vue-cal/weekdays-headings.vue @@ -53,7 +53,7 @@ export default { let todayFound = false const headings = this.weekDays.map((cell, i) => { - const date = this.utils.date.addDays(this.view.startDate, this.vuecal.startWeekOnSunday ? i - 1 : i) + const date = this.utils.date.addDays(this.view.startDate, this.vuecal.startWeekOnSunday && this.vuecal.hideWeekends ? i - 1 : i) return { hide: cell.hide,