Vue2-datepicker: [Bug] Wrong week number in 2021

Created on 4 Jan 2021  路  3Comments  路  Source: mengxiong10/vue2-datepicker

Vue2-datepicker version: 3.8.2
Vue version: 2.6.11
Browser: All

Steps to reproduce

  • Display calendar with type="week"
  • look the first week of 2021

Reproduction Link or Source Code

Expected behavior
The week number should be calculate by following ISO 8601
ISO 8601 wiki

The week number should be:

  • 53 from 28 to 3
  • 1 from 4 to 10
  • 2 ...
  • ....

Actual behavior
The week number is:

  • 1 from 28 to 3
  • 2 from 4 to 10
  • 3 ...
  • ....

Capture d鈥櫭ヽran 2021-01-04 脿 12 06 34

PS
Thanks for your work and this great component.

Most helpful comment

You can change the firstWeekContainsDate.

<date-picker  :lang="{ formatLocale: { firstWeekContainsDate: 4 } }" />

All 3 comments

You can change the firstWeekContainsDate.

<date-picker  :lang="{ formatLocale: { firstWeekContainsDate: 4 } }" />

Thank you =)

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

BuiHuyCuong picture BuiHuyCuong  路  5Comments

Raiondesu picture Raiondesu  路  4Comments

musman92 picture musman92  路  4Comments

4spen picture 4spen  路  4Comments

kgusihin picture kgusihin  路  5Comments