Open celsomtrindade opened 9 years ago
+1 - currently running into an issue where need to allow users to input money values up into the millions and comma handling is extremely tricky. I've almost got it working with: $9?9?9?,?9?9?9?,?9?9?9? - however it is confusing users because both commas appear when typing and they feel that something is incomplete about the field
+1
+1
+1
+1
+1
+1
You can set a style in input field with: style="direction:rtl;" and mask with mask="R$99,999.99"
+1
+1
+1
+1
+1
+1
👍
+1
+1
+1
+1
i used the @danielbertini suggestion, but the number 0 didnt seems to work with the mask
+1
+1
After some tests i get a nice result with this: mask="9?9?9?9?9?9?9?9?9.99"
@minasvisual It will "work" but it doesn't have the money prefix, like R$, US$, etc.. Also, it doesn't add the proper pontuation. For example, if I type 149990
it's not going to convert to R$1.499,90
it will be 1499,90
.
I know it may work for you, but it would be nice to have a proper money mask built in.
Note: I'm also not juding your method! Far from that! I'm just poiting out what it's missing and trying to show why we still need an actual money mask.
Just a side note: I was able to create a directive to turn numbers into a money mask and it work as expected. I just need to check how it can be implemented with this module. I'll make my files public so if anyone can help with that, it would be great!
+1
Resolved this problem with help custom filter and replaced comma on ""
app.filter('toString', ['$filter', function($filter) { return function(string) { return $filter('currency')(string, '', 2).replace(",", ""); } }]);
+1
+1
+100500
Does it have a way to create a money mask? Or to 'reverse fill' the input? I tried to use this mask:
mask="9.99?9,99"
but it doesn't work because it fills from left to right. If at least it was from right to left, it could work.Is there a way to create a currency mask? Didn't found anything on the docs about it.