Closed jdwillemse closed 6 years ago
I spotted this answer but it doesn't solve my problem https://github.com/osrec/currencyFormatter.js/issues/22
The zero space option results in unexpected behaviour in my demo, and the custom formatting option defeats the point of using a library with all the locales formatted
Hi, this seems to be a common request. One of our devs will issue an update to the library in the next few days, allowing an empty symbol override :)
Fixed in version 2.2.0. You can now do either of the following to remove the symbol
OSREC.CurrencyFormatter.format(123456, { currency: 'USD', symbol: '' })
or
OSREC.CurrencyFormatter.format(123456, { currency: 'USD', symbol: null })
Is it possible to format a currency without adding the symbol? I know it is possible with custom formatting but if I have to customise the formatting for all locales my use of this library becomes pointless.
I'm trying to format user input inside an input field. If the symbol trails the value the UX is weird. Here is an example of the problem: https://codepen.io/fuzzyvagina/pen/MXGYaj
It would be great if passing null as symbol disabled the symbol: