x-mask.number and $money helper with option for number of decimal digits #2873
Replies: 4 comments 2 replies
-
This requirement is preventing me from making use of the $money helper. I'd also like to format a money field as a non-decimal amount as well. ie. $2,500,000 (large amounts where cents are pointless) |
Beta Was this translation helpful? Give feedback.
-
the same need arises when handling stock exchange rates with more than two decimal scales, please add! |
Beta Was this translation helpful? Give feedback.
-
Here's a pull request #3415 to allow for custom decimal precision. It allows for any custom amount of decimal precision digits, for example 3, like so: And also allows for disabling any decimal precision digits by setting it to 0, as requested by @akaspick, like so: |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
It would be great to have an option for x-mask to set the number of decimal digits in a range from 0 to n, for both x-mask.number and the $money helper.
Practical Background:
I just had the problem that I had to display a money value but strictly without decimal digits (it was an online calculator for a financial site re investment fonds). So I hoped for using the $money helper to get the correct masking but could not suppress the decimal digits if someone tried to enter some.
Beta Was this translation helpful? Give feedback.
All reactions