You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
IMHO, if using a DatePicker with type="week", the displayed week number should always be ISO 8601 compliant, i.e. weeks start on monday, even if the popup renders any other weekday as the first day of week.
Basically, I expect this DatePicker to behave as the native <input type="week">, which is sadly not supported by Firefox and Safari.
As you can see in this screenshot, according to my browser locale, which is en-US, Chrome renders the popup of the native input elements with sunday as the first day of week, but it shows that the range of a single week is from monday to sunday.
Actual behavior
Selecting a locale which does not use monday as the first day of week, e.g. en, changes the displayed week number when selecting this locale specific first day of week compared to locales which use monday as the first day of week.
In the following screenshot, I select Sunday December 29, which results in week number 1 being displayed, but according to ISO 8601, that date is in week 52 (of 2024).
The text was updated successfully, but these errors were encountered:
Sector6759
changed the title
[Bug] Week seems to be locale dependant, but should always be ISO8061 compliant
[Bug] Week seems to be locale dependant, but should always be ISO 8061 compliant
Nov 8, 2024
Sector6759
changed the title
[Bug] Week seems to be locale dependant, but should always be ISO 8061 compliant
[Bug] Week seems to be locale dependant, but should always be ISO 8601 compliant
Nov 8, 2024
Vue2-datepicker version: 1.0.3
Vue version: 3.5.12
Browser: Chrome 130.0.6723.116
Steps to reproduce
type="week"
en
localeReproduction Link or Source Code
Expected behavior
IMHO, if using a DatePicker with
type="week"
, the displayed week number should always be ISO 8601 compliant, i.e. weeks start on monday, even if the popup renders any other weekday as the first day of week.Basically, I expect this DatePicker to behave as the native
<input type="week">
, which is sadly not supported by Firefox and Safari.As you can see in this screenshot, according to my browser locale, which is
en-US
, Chrome renders the popup of the native input elements with sunday as the first day of week, but it shows that the range of a single week is from monday to sunday.Actual behavior
Selecting a locale which does not use monday as the first day of week, e.g.
en
, changes the displayed week number when selecting this locale specific first day of week compared to locales which use monday as the first day of week.In the following screenshot, I select Sunday December 29, which results in week number 1 being displayed, but according to ISO 8601, that date is in week 52 (of 2024).
The text was updated successfully, but these errors were encountered: