|
@@ -154,13 +154,16 @@ Optional extensions on the jquery.inputmask base
|
|
|
return false;
|
|
return false;
|
|
|
},
|
|
},
|
|
|
radixHandler: function (chrs, maskset, pos, strict, opts) {
|
|
radixHandler: function (chrs, maskset, pos, strict, opts) {
|
|
|
- if (!strict && chrs === opts.radixPoint) {
|
|
|
|
|
|
|
+ if (!strict && chrs === opts.radixPoint && opts.digits > 0) {
|
|
|
var radixPos = $.inArray(opts.radixPoint, maskset.buffer), integerValue = maskset.buffer.join('').match(opts.regex.integerPart(opts));
|
|
var radixPos = $.inArray(opts.radixPoint, maskset.buffer), integerValue = maskset.buffer.join('').match(opts.regex.integerPart(opts));
|
|
|
|
|
|
|
|
if (radixPos != -1 && maskset["validPositions"][radixPos]) {
|
|
if (radixPos != -1 && maskset["validPositions"][radixPos]) {
|
|
|
if (maskset["validPositions"][radixPos - 1])
|
|
if (maskset["validPositions"][radixPos - 1])
|
|
|
return { "caret": radixPos + 1 };
|
|
return { "caret": radixPos + 1 };
|
|
|
else return { "pos": integerValue.index, c: integerValue[0], "caret": radixPos + 1 };
|
|
else return { "pos": integerValue.index, c: integerValue[0], "caret": radixPos + 1 };
|
|
|
|
|
+ } else if (!integerValue || integerValue["0"] == "0") {
|
|
|
|
|
+ maskset.buffer[integerValue ? integerValue.index : pos] = "0";
|
|
|
|
|
+ return { "pos": (integerValue ? integerValue.index : pos) + 1 };
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return false;
|
|
return false;
|