Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
269 stars 75 forks source link

Date selected in input-date-picker gets cleared for "bs", "it-CH" locales #9387

Open annierm18 opened 1 month ago

annierm18 commented 1 month ago

Check existing issues

Actual Behavior

The selected date gets cleared (and is replaced by the placeholder) when the user clicks out of the component for the "bs", "it-CH" locales.

Expected Behavior

Reproduction Sample

https://codepen.io/annierm18/pen/YzbqdXO?editors=100

Reproduction Steps

  1. Open input-date-picker in codepen
  2. Add the lang="bs" or "it-CH" tag
  3. Select a date from the calendar
  4. Click outside of the component

Reproduction Version

2.8.2

Relevant Info

There is a corresponding dev issue for this: https://devtopia.esri.com/WebGIS/arcgis-enterprise-manager/issues/1758. It says "The issue is reproducible on Chrome and Edge Chromium"

Regression?

No response

Priority impact

impact - p3 - not time sensitive

Impact

No response

Calcite package

Esri team

ArcGIS Enterprise

geospatialem commented 1 month ago

Added the p - high label as suggested by @annierm18 and the i18n team.

Akochure commented 1 month ago

Thanks, @annierm18, for logging the issue. We have used the temporary fix based on Blake's comment - https://github.com/Esri/calcite-design-system/issues/4583#issuecomment-1156807166. But need to fix this issue in the component.

anveshmekala commented 6 days ago

Did some digging and this is expected for few locales since we are relying toLocaleDateString API which is implementation specific. Safari and firefox handles bs locale as expected but not chrome. it-CH locale has reported issue in CLDR https://unicode-org.atlassian.net/browse/CLDR-16491 for date separator.

Quick workaround would be to fallback to bs-Cyrl for bs locale and de-CH locale for it-CH for the string conversion part.

Using toLocaleDateString as source of truth for string conversion of locale specific dates going forward needs to be reviewed .