React-number-format: decimalSeparator="," is not woking

Created on 8 Sep 2019  路  3Comments  路  Source: s-yadav/react-number-format

Why _decimalSeparator=","_ is not woking in the sample below ?
https://codesandbox.io/s/material-demo-jq806

The code is from Material UI Text Field documentation.

Regards,

Most helpful comment

@leonardo-sj If you are using values.value, you should pass isNumeriString.
https://github.com/s-yadav/react-number-format#values-object
Will send a PR to material-UI for the fix.

@bahamut657 What strange behaviour are you getting with isNumericString?

All 3 comments

I've got the same issue, and can not use react-number-format to mimic German currency for example 1.223.578,00

I can confirm that:

  • decimalSeparator using "," is not working.
  • fixedDecimalScale using "," is accepting max 3 characters (if decimalScale is 2..how to insert 1400,25??)
  • isNumericString is performing some strange behaviours

For the moment, I just replaced the plugin with https://react-intl-number-format.netlify.com/ that seems to perform better.

Regards

@leonardo-sj If you are using values.value, you should pass isNumeriString.
https://github.com/s-yadav/react-number-format#values-object
Will send a PR to material-UI for the fix.

@bahamut657 What strange behaviour are you getting with isNumericString?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tanya94 picture tanya94  路  3Comments

everlasting-neverness picture everlasting-neverness  路  5Comments

fedulovivan picture fedulovivan  路  6Comments

lucasglobalsys picture lucasglobalsys  路  5Comments

osvaldokalvaitir picture osvaldokalvaitir  路  3Comments