cchanxzy / react-currency-input-field

React component for an input field
MIT License
648 stars 118 forks source link

Intl.NumberFormat formatToParts not supported in early Safari versions #320

Closed alexander-baz closed 8 months ago

alexander-baz commented 11 months ago

Safari of versions prior to 13 do not support Intl.NumberFormat formatToParts function. So in case of Safari < 13 the error is thrown.

To Reproduce Steps to reproduce the behavior:

  1. Open Safari of 12 version and earlier
  2. Navigate to any app or sandbox using the package
  3. See error

Expected behavior I would expect some kind of default formatting like, for example, for en-US locale (, as group and . as a decimal separators).

https://caniuse.com/?search=Intl%3A%20NumberFormat%3A%20formatToParts