Skip to content

Commit

Permalink
[Fix] Issue when number starts with zero
Browse files Browse the repository at this point in the history
  • Loading branch information
wender committed Jun 24, 2015
1 parent bd6664a commit fde1dd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/angular-simple-mask.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ angular.module('angularMask', [])
model.$formatters.push(mask);
model.$parsers.push(function (value) {
model.$viewValue = mask(value);
var modelValue = parseInt(String(value).replace(/\D/g,''));
var modelValue = String(value).replace(/\D/g,'');
el.val(model.$viewValue);
return modelValue;
});
Expand Down

0 comments on commit fde1dd6

Please sign in to comment.