react-currency-input-field
react-currency-input-field copied to clipboard
Swedish Krona error
Describe the bug
When using the configuration below and typing more than 2 numbers the textbox changes to "NaN kr":
<ReactCurrencyInput intlConfig={{ locale: "sv-SE", currency: "SEK"}} />
To Reproduce just insert the component with the given intlConfiguration and type 2 numbers.
Expected behavior I expected the numbers to be formatted correctly on the Swedish Krona currency and locale
Code Sandbox https://codesandbox.io/s/new-thunder-xk481x
I have the same issue with Danish Kroner. It has to do with the abbreviations, where both SEK and DKK contains K, which means it will multiple whatever you enter with 1000 and that can result in NaN.
A temporary fix for you would be disabling abbreviations by passing disableAbbreviations like they explain here.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.