maska
maska copied to clipboard
Option to 'reverse' the order in which the mask applies
As far as I've seen the mask currently always applies from left to right on the characters.
The mask #,###
would give 1
, then 1,0
, then 1,00
and finally 1,000
when a user enters 1000
.
I need users to input very large numbers (9+ digit ints) so for me the comma to seperate thousands is very important.
If I could reverse the interpretation it would give: 1
, then 10
, then 100
, then 1,000
.
I can add it and create a PR if you like?
Do you want to add new option to reverse mask, something like this?
<input v-maska="{ mask: '#,###', reverse: true }">
👍🏽 need this as well, very useful for things like height, weight, ...
This worked for me, for the reverse option
<input v-maska="{ mask: '[ "#,###,###,###.##" , "###,###,###.##" , "##,###,###.##" , "#,###,###.##" , "###,###.##" , "##,###.##" , "#,###.##" , "###.##" , "##.##" , "#.##" ]' }">
<input v-maska="{ mask: '[ "#,###.##" , "###.##" , "##.##" , "#.##" ]' }">
...
Do you want to add new option to reverse mask, something like this?
<input v-maska="{ mask: '#,###', reverse: true }">
This will be very usefull
Also need this.
another one in need, a must have for masking
+1
Same
Implemented in v2