Is it possible to override the autocomplete field by '0' when we use an inputMask('####').
For example : i define a mask for only numbers with decalring an inputMask('#########').
after entered a number, for example 9, the framework complete the field by '0' like '000000009'
Thanks
Regards
Philippe
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
That is supported out of the box, but after the field looses focus.
For example: if the mask is ##### and you type 1, as you leave the field it will be changed to 00001.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok,
In fact i would like to know if it's possible to keep the entered value after the loose of the focus : in your example, i would like to keep the value '1' and not complete by '0'.
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Then what you want is not an InputMask, but a NumberMask.
Try this:
var numberParser = new NumberParser(0);
numberParser.useGrouping = false;
new NumberMask(numberParser, input, 5) //5 is the max integer digits
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, I don't get what you want. You want a mask that removes the leading 0's but you've complained that the NumberMask removed it...
Sorry, I don't think what you want is possible. By the way, I think you haven't figured out exactly what you want.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok, i take again your example :
var numberParser = new NumberParser(0);
numberParser.useGrouping = false;
new NumberMask(numberParser, input, 5)
if i entered the number '05678', after lost focus the number will be '5678 ' while i entered 05678 (i lost '0' !); if i use an inputMask('####'), and i entered the number 34, after lost focus the number entered tunr into '0034' ; i can understand for the last case there is an autocomplete by '0' for an inputMask('###') but in the first case (when i use an NumberMask) i don't see why the '0' disappear after lost focus !
Anyway your framework is very interesting beyond the mask, i have recommended it to other developers...congratulations.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
Is it possible to override the autocomplete field by '0' when we use an inputMask('####').
For example : i define a mask for only numbers with decalring an inputMask('#########').
after entered a number, for example 9, the framework complete the field by '0' like '000000009'
Thanks
Regards
Philippe
That is supported out of the box, but after the field looses focus.
For example: if the mask is ##### and you type 1, as you leave the field it will be changed to 00001.
Ok,
In fact i would like to know if it's possible to keep the entered value after the loose of the focus : in your example, i would like to keep the value '1' and not complete by '0'.
Thanks
Then what you want is not an InputMask, but a NumberMask.
Try this:
var numberParser = new NumberParser(0);
numberParser.useGrouping = false;
new NumberMask(numberParser, input, 5) //5 is the max integer digits
Thank You Luis,
However i have a bug when for example i entered '06050', the first '0' is automatically deleted , the result given is '6050' !
Ok, I don't get what you want. You want a mask that removes the leading 0's but you've complained that the NumberMask removed it...
Sorry, I don't think what you want is possible. By the way, I think you haven't figured out exactly what you want.
Ok, i take again your example :
var numberParser = new NumberParser(0);
numberParser.useGrouping = false;
new NumberMask(numberParser, input, 5)
if i entered the number '05678', after lost focus the number will be '5678 ' while i entered 05678 (i lost '0' !); if i use an inputMask('####'), and i entered the number 34, after lost focus the number entered tunr into '0034' ; i can understand for the last case there is an autocomplete by '0' for an inputMask('###') but in the first case (when i use an NumberMask) i don't see why the '0' disappear after lost focus !
Anyway your framework is very interesting beyond the mask, i have recommended it to other developers...congratulations.