I'm having some trouble with the NumberMasks I'm using in a web portal. In the application it's being used, a zero as the leftmost digit of a number (integer) should be valid, since the number masks represents document numbers. The masks doesn't accept the '0' as the first digit. How can I fix it ?
Thanks in advance,
Leonel
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
The NumberMask is supposed to create numbers, and zeros on the left side are void.
If you want something like a "string containing numbers only", then you should not use a NumberMask, but an InputMask, like this:
new InputMask(JST_MASK_NUMBERS, "field");
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
But now I've another doubt. Is there a way to choose the typing from right to left when using InputMask ? It's to use in the same inputs where I made the changes.
Thanks for the tip and the attention.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, InputMask only support typing from left to right.
What might give you the impression you want is to use a text-align:right CSS rule to the input field.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello guys,
I'm having some trouble with the NumberMasks I'm using in a web portal. In the application it's being used, a zero as the leftmost digit of a number (integer) should be valid, since the number masks represents document numbers. The masks doesn't accept the '0' as the first digit. How can I fix it ?
Thanks in advance,
Leonel
Oops ! I forgot to mention that I'm using the JavaScripTools version 2.2.1, released in January 10th of the present year.
Thanks again
Hi!
The NumberMask is supposed to create numbers, and zeros on the left side are void.
If you want something like a "string containing numbers only", then you should not use a NumberMask, but an InputMask, like this:
new InputMask(JST_MASK_NUMBERS, "field");
That's what I did. =)
But now I've another doubt. Is there a way to choose the typing from right to left when using InputMask ? It's to use in the same inputs where I made the changes.
Thanks for the tip and the attention.
No, InputMask only support typing from left to right.
What might give you the impression you want is to use a text-align:right CSS rule to the input field.
Ok.
Thanks very much