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

feat(date-textbox): localize date placeholders #2191

Merged
merged 7 commits into from
Jun 24, 2024

Conversation

LuLaValva
Copy link
Member

Description

  • Pull date format data from CLDR
  • Enforce localized date format
  • Add automatic placeholders based on locale
  • Various UX improvements
    • Automatically add localized d/m/y separators while typing
    • When 2-digit year is entered, default to 1900s or 2000s
  • Remove deprecations in date-textbox and calendar

Screenshots

image image image image

@LuLaValva LuLaValva requested a review from agliga June 14, 2024 16:54
@LuLaValva LuLaValva self-assigned this Jun 14, 2024
Copy link

changeset-bot bot commented Jun 14, 2024

🦋 Changeset detected

Latest commit: 6b318c2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@ebay/ebayui-core Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@LuLaValva LuLaValva changed the base branch from master to 14.0.0 June 14, 2024 16:57
Copy link
Contributor

@agliga agliga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codewise looks good
Will verify it locally

@@ -0,0 +1,5 @@
---
"@ebay/ebayui-core": patch
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be major

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually because 14.0.0 does not match with master, I didn't add a changeset

};

const modernLocales = JSON.parse(
fs.readFileSync("node_modules/cldr-core/availableLocales.json"),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just do a json top level import?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea, that's more clean for sure. Added.

@LuLaValva LuLaValva merged commit 1290638 into 14.0.0 Jun 24, 2024
4 checks passed
@LuLaValva LuLaValva deleted the localized-date-placeholders branch June 24, 2024 14:30
This was referenced Jun 24, 2024
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

Successfully merging this pull request may close these issues.

ebay-date-textbox: not formatting date values correctly in input box for some locale input with country code
2 participants