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

Currencies with Sanskrit allow only one symbol #366

Open
heniotierra opened this issue Sep 12, 2024 · 1 comment · May be fixed by #369
Open

Currencies with Sanskrit allow only one symbol #366

heniotierra opened this issue Sep 12, 2024 · 1 comment · May be fixed by #369

Comments

@heniotierra
Copy link

heniotierra commented Sep 12, 2024

Currencies only allow for one digit:
BDT - Taka
BHD - Bahraini Dinar
EGP - Egyptian Pound
JOD - Jordanian Dinar
KWD - Kuwaiti Dinar
LBP - Lebanese Pound
OMR - Rial Omani
QAR - Qatari Rial
SAR - Saudi Riyal

Can only type/enter single digit numbers for the currencies listed above. (1,2,3,ect.)

To Reproduce

  1. Set intlConfig to {locale: 'bn-BD', currency: 'BDT'}
  2. Try typing any number with more than one digit
  3. Only last typed digit will show

Expected behavior
Expected to be able to type numbers with more than one digit.

Code Sandbox
https://codesandbox.io/p/sandbox/suspicious-sound-cn83zv?file=%2Fsrc%2FApp.js

More intl configs with same issue:
{locale: 'ar-BH', currency: 'BHD'}
{locale: 'ar-EG', currency: 'EGP'}
{locale: 'ar-JO', currency: 'JOD'}
{locale: 'ar-KW', currency: 'KWD'}
{locale: 'ar-LB', currency: 'LBP'}
{locale: 'ar-OM', currency: 'OMR'}
{locale: 'ar-SA', currency: 'SAR'}
{locale: 'ar-QA', currency: 'QAR'}

This is not an exhaustive list, and issue affects not only 'ar-*' locales, for example:
{locale: 'fa-AF', currency: 'AFN'}

@simon-v-swyftx
Copy link

I have a fix here: e146f0a (see Example 3)

CleanShot 2024-10-31 at 13 27 23
CleanShot 2024-10-31 at 13 27 37
CleanShot 2024-10-31 at 13 27 46
CleanShot 2024-10-31 at 13 27 56

No tests written so good luck 😅

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 a pull request may close this issue.

2 participants