Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Wrong week number in 2021 #566

Closed
kugatsu765 opened this issue Jan 4, 2021 · 3 comments
Closed

[Bug] Wrong week number in 2021 #566

kugatsu765 opened this issue Jan 4, 2021 · 3 comments

Comments

@kugatsu765
Copy link

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’écran 2021-01-04 à 12 06 34

PS
Thanks for your work and this great component.

@mengxiong10
Copy link
Owner

You can change the firstWeekContainsDate.

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

@kugatsu765
Copy link
Author

Thank you =)

@janvince
Copy link

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants