Skip to content

Commit

Permalink
Merge pull request #528 from chillburn/bugfix/start-week-on-sunday-in…
Browse files Browse the repository at this point in the history
…correct-labels

Bugfix/start week on sunday incorrect labels
  • Loading branch information
antoniandre authored Sep 25, 2024
2 parents d1eb1ab + b0371c7 commit d81d8c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/vue-cal/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/vue-cal/weekdays-headings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

3 comments on commit d81d8c4

@ragnar1405
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello,
I am still experiencing the issue where the weekdays are displayed incorrectly in the Vue Cal component when startWeekOnSunday is set to true. I would like to know if there is a more recent version available that resolves this problem, or if there are any additional steps I should take to ensure the component works correctly.
Thank you for your assistance!

@antoniandre
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ragnar1405 this is just released now in version 4.10.0

@ragnar1405
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you so much for helping me is full functioning right now

Please sign in to comment.