question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

decimal and thousands separators format europe

See original GitHub issue

Hello,

I trying format the input to . and , but not working Any solution for this?

return (
        <NumberFormat
            {...other}
            ref={inputRef}
            onValueChange={values => {
                onChange({
                    target: {
                        value: values.value,
                    },
                });
            }}          
            thousandSeparator="." 
            decimalSeparator=","
            allowNegative={false}
            prefix="R$"
        />
    );

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:2
  • Comments:18 (6 by maintainers)

github_iconTop GitHub Comments

9reactions
cassioseffrincommented, Jul 18, 2022

I have managed to do it as follow bellow

    return (
        <NumberFormat
            {...other}
            getInputRef={ref}
            onValueChange={(values) => {
                onChange({
                    target: {
                        name: props.name,
                        value: values.value,
                    },
                });
            }}
            isNumericString
            prefix="R$ "
            allowNegative={false}
            decimalSeparator={","}
            thousandSeparator={"."}
            decimalScale={2}
            fixedDecimalScale={true}
        />
    );
7reactions
PraveenPuvvulacommented, Nov 13, 2018

I change to other package

Could you please tell me which? Thanks

Read more comments on GitHub >

github_iconTop Results From Across the Web

Decimal and Thousands Separators
The decimal separator is also called the radix character. Likewise, while the U.K. and U.S. use a comma to separate groups of thousands,...
Read more >
Number formatting - Globalization | Microsoft Learn
Thousands separator, decimal separator, and the way negative numbers are displayed can vary in different countries/regions.
Read more >
Decimal separator - Wikipedia
A decimal separator is a symbol used to separate the integer part from the fractional part of a number written in decimal form...
Read more >
Www.languageediting.com New Blog at 2022-12-29
salomon skin pro 15 set · salomon junior · salomon quest pro 90 · salomon haloes down · salomon xa pro 3d cswp...
Read more >
European Numeric Format (-E) - Progress Documentation
Use European Numeric Format ( -E ) parameter to tell the AVM to display thousands separators as periods and decimal points as commas...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found