3

As the title, I have tried many times the code without success, hoping for help from the community

this code format currency prefix!

<InputNumber
   defaultValue={1000}
   formatter={value => `$ ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')}
   parser={value => value.replace(/\$\s?|(,*)/g, '')}
/>
PinkP7996
  • 43
  • 6
  • 1
    Any examples? [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – Dennis Vash Aug 14 '19 at 10:45

0 Answers0