Hi, I didn't see anything on the documentation about reversing the order of the component to start filling from right to left, so I'm leaving it here: In some countries, like Brazil, currency is typically filled from right to left, so is there a way to accomplish this or it would be a new feature? Thanks!
Just give text-align: right; to your input. You can pass className as prop and you can define that rule.
If I may clarify for @TheoneLucas, we would like to see the input filled in the reverse order.
For example, I'd like to input $ 12.34 but I would like the numbers to enter right to left as you write them like so with padded leading zeros:
$ 0.00 --$ 0.01--$ 0.12-- $ 1.23--$ 12.34
If I attempt to change the direction of the input from left to right, to rtl I lose the ability to use the decimal.
Yes, as stated by @chelsearoman-ca, I would like the numbers to fill from right to left, not align them.
Hey guys! I am interested in this feature as well. Did you find a solution?
@lutchobandeira Nope, I still think that it is responsability of the react-number-format to give an API to change it's own behavior, in this case the text direction. Given the number of thumbs up in this thread I stiil don't know why this thread was ignored and closed. I do think that this is an issue worth looking at and would love to hear from @s-yadav about a possible opening for implementation by the community, me included if needed.
@s-yadav any position for this? I need this feature
@s-yadav any update for this issue? @theonelucas you resolved this with another way?
For everyone here(mainly if you are brazilian), check #366, there you will find the answer.
Also this should help: https://stackblitz.com/edit/inputmask-reactjs-typescript-2ejtzv (#366 its implemented here)
Some info about the live code: It's not done, has some bugs, i'm working on it.
Most helpful comment
If I may clarify for @TheoneLucas, we would like to see the input filled in the reverse order.
For example, I'd like to input
$ 12.34but I would like the numbers to enter right to left as you write them like so with padded leading zeros:$ 0.00--$ 0.01--$ 0.12--$ 1.23--$ 12.34If I attempt to change the direction of the input from left to right, to
rtlI lose the ability to use the decimal.