react-currency-input-field icon indicating copy to clipboard operation
react-currency-input-field copied to clipboard

Swedish Krona error

Open Thorvarium opened this issue 3 years ago • 1 comments
trafficstars

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

Thorvarium avatar Sep 09 '22 21:09 Thorvarium

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.

rasmusbuchholdt avatar Sep 21 '22 06:09 rasmusbuchholdt

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.

stale[bot] avatar Nov 22 '22 17:11 stale[bot]