Skip to content

Date Picker - First day of month set incorrectly in ar locales #6182

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

Closed
geospatialem opened this issue Dec 27, 2022 · 3 comments
Closed

Date Picker - First day of month set incorrectly in ar locales #6182

geospatialem opened this issue Dec 27, 2022 · 3 comments
Assignees
Labels
4 - verified Issues that have been tested, confirmed as mitigated, and are ready to close. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. c-datepicker Issues that pertain to the calcite-date-picker component Calcite (dev) Issues logged by Calcite developers. i18n-l10n issues dealing with internationalization/localization

Comments

@geospatialem
Copy link
Member

Actual Behavior

When date-picker's lang is set to "ar" the first day of the month is not set properly.

In 11 of 12 months of the year, the date is set to Saturday when it is not.

cc @annierm18

Expected Behavior

The date-picker should behave and set the date in all locales equally.

Reproduction Sample

https://codepen.io/geospatialem/pen/OJwMgoK

Reproduction Steps

  1. Open the sample
  2. Observe the first day of the month is set properly when lang="en", but not when lang="ar".
  3. The first day of the month should be set to Wednesday in Arabic, or the 5th day of the week in the calendar.

Reproduction Version

next.702

Relevant Info

  1. There were no issues prior to PR fix(date-picker): modify weekStart value for ar locale #6154, but the PR addressed the proper setup to showcase calendars for ar locales.
    • This is the only locale with Saturday set as the first day of the week
  2. Doesn't seem related to date-picker: the weekday and date are not correlated in some locales (including en-gb, en-au, nb, es, de ...) #5136, but has a similar experience.

Regression?

No response

Impact

For consistency across web products, we should try to incorporate for the January release.

Esri team

Calcite (dev)

@geospatialem geospatialem added bug Bug reports for broken functionality. Issues should include a reproduction of the bug. 0 - new New issues that need assignment. i18n-l10n issues dealing with internationalization/localization labels Dec 27, 2022
@geospatialem geospatialem added this to the 2023 January Priorities milestone Dec 27, 2022
@github-actions github-actions bot added the Calcite (dev) Issues logged by Calcite developers. label Dec 27, 2022
@anveshmekala anveshmekala self-assigned this Jan 17, 2023
@anveshmekala anveshmekala added 2 - in development Issues that are actively being worked on. and removed 0 - new New issues that need assignment. labels Jan 19, 2023
@annierm18
Copy link
Contributor

@anveshmekala I tested several months for "ar" which has Saturday as the first day of the week, and the calendar looked good. I also tested several months for "th" which has Sunday as the first day of the week and "da" which has Monday as the first day of the week. Both those calendars looked good as well.

anveshmekala added a commit that referenced this issue Jan 24, 2023
…locale (#6309)

**Related Issue:** #6182 
## Summary

This PR will display correct day for first day the month in `ar` locale.
 
_Note: No changes expected for other locales. Current screenshots will
cover locales whose weekStart index is either 1,6 or 7. There aren't any
other locales whose weekStart index falls outside of 1,6 or 7._
@anveshmekala anveshmekala added 3 - installed Issues that have been merged to the "dev" branch and/or are ready for QA/QC. and removed 2 - in development Issues that are actively being worked on. labels Jan 24, 2023
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been tested, confirmed as mitigated, and are ready to close. and removed 3 - installed Issues that have been merged to the "dev" branch and/or are ready for QA/QC. labels Jan 24, 2023
@geospatialem
Copy link
Member Author

Verified on next.732

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been tested, confirmed as mitigated, and are ready to close. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. c-datepicker Issues that pertain to the calcite-date-picker component Calcite (dev) Issues logged by Calcite developers. i18n-l10n issues dealing with internationalization/localization
Projects
None yet
Development

No branches or pull requests

4 participants