Skip to content

Commit

Permalink
[Issue-77] Fix numeral setRawValue issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nosir committed Aug 13, 2016
1 parent 7c8873d commit 5537374
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
[![Codacy branch grade](https://img.shields.io/codacy/grade/b1c0b0da42fa418f887076a3f7352aea/master.svg?maxAge=2592000)](https://www.codacy.com/app/nosir/cleave-js)
[![npm version](https://badge.fury.io/js/cleave.js.svg)](https://badge.fury.io/js/cleave.js)
[![Bower version](https://badge.fury.io/bo/cleave.js.svg)](https://badge.fury.io/bo/cleave.js)
[![Documents](https://img.shields.io/badge/documents-check-3362c2.svg)](https://github.com/nosir/cleave.js/blob/master/doc/doc.md)

Cleave.js has a simple purpose: to help you format input text content automatically.

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"form",
"input"
],
"version": "0.6.5",
"version": "0.6.6",
"author": {
"name": "Max Huang",
"email": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion dist/cleave-react.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion dist/cleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,14 @@ Cleave.prototype = {
},

setRawValue: function (value) {
var owner = this;
var owner = this, pps = owner.properties;

value = value.toString();

if (pps.numeral) {
value = value.replace('.', pps.numeralDecimalMark);
}

owner.element.value = value;
owner.onInput(value);
},
Expand Down
4 changes: 2 additions & 2 deletions dist/cleave.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"form",
"input"
],
"version": "0.6.5",
"version": "0.6.6",
"author": {
"name": "Max Huang",
"url": "http://github.com/nosir",
Expand Down
6 changes: 5 additions & 1 deletion src/Cleave.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,14 @@ Cleave.prototype = {
},

setRawValue: function (value) {
var owner = this;
var owner = this, pps = owner.properties;

value = value.toString();

if (pps.numeral) {
value = value.replace('.', pps.numeralDecimalMark);
}

owner.element.value = value;
owner.onInput(value);
},
Expand Down

0 comments on commit 5537374

Please sign in to comment.