|
|
@@ -284,7 +284,7 @@ Optional extentions on the jquery.inputmask base
|
|
|
placeholder: "",
|
|
|
repeat: 10,
|
|
|
greedy: false,
|
|
|
- numericInput: false, //true => not working fixme
|
|
|
+ numericInput: true, //true => not working fixme
|
|
|
regex: {
|
|
|
number: function(radixPoint, digits) { return new RegExp("^([\+\-]?[0-9]*[" + radixPoint + "]?[0-9]" + digits + ")$"); }
|
|
|
},
|
|
|
@@ -292,9 +292,10 @@ Optional extentions on the jquery.inputmask base
|
|
|
'~': { //real number
|
|
|
validator: function(chrs, buffer, pos, strict, opts) {
|
|
|
function digitExpression() {
|
|
|
- return isNaN(opts.digits) ? opts.digits : (strict ? '{' + opts.digits + '}' : '{0,' + opts.digits + '}');
|
|
|
+ return isNaN(opts.digits) ? opts.digits : '{0,' + opts.digits + '}';
|
|
|
}
|
|
|
- var cbuf = buffer.slice(); cbuf[pos] = chrs;
|
|
|
+ var cbuf = buffer.slice(0, pos + 1);
|
|
|
+ cbuf[pos + 1] = chrs;
|
|
|
var bufferStr = cbuf.join('');
|
|
|
var isValid = opts.regex.number(opts.radixPoint, digitExpression()).test(bufferStr);
|
|
|
if (!strict && !isValid) {
|