Skip to content

Commit

Permalink
Update to release v1.0.1 fixes #3
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Apr 30, 2018
1 parent d0864ae commit 9e9fea8
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Change Log: `yii2-number`
=========================

## Version 1.0.1

**Date:** 01-May-2018

- (bug #3): Fix `val.replace` error due to inputmask auto unmask.

## Version 1.0.0

**Date:** 30-Jan-2018
Expand Down
5 changes: 2 additions & 3 deletions NumberControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-number
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2018
* @version 1.0.0
* @version 1.0.1
*/

namespace kartik\number;
Expand Down Expand Up @@ -96,8 +96,7 @@ protected function initWidget()
'digits' => 2,
'groupSeparator' => ',',
'autoGroup' => true,
'autoUnmask' => true,
'unmaskAsNumber' => true,
'autoUnmask' => false
];
$this->maskedInputOptions = array_replace_recursive($defaultOptions, $this->maskedInputOptions);
}
Expand Down
2 changes: 1 addition & 1 deletion NumberControlAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* @package yii2-number
* @author Kartik Visweswaran <[email protected]>
* @copyright Copyright &copy; Kartik Visweswaran, Krajee.com, 2018
* @version 1.0.0
* @version 1.0.1
*/

namespace kartik\number;
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ A number control input for Yii2 Framework that uses the [jQuery input mask plugi
Refer [detailed documentation and demos](http://demos.krajee.com/number).

## Latest Release
The latest version of the module is v1.0.0. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-number/blob/master/CHANGE.md) for details.
The latest version of the module is v1.0.1. Refer the [CHANGE LOG](https://github.com/kartik-v/yii2-number/blob/master/CHANGE.md) for details.

### Install

Expand Down
7 changes: 3 additions & 4 deletions assets/js/number.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*!
* @package yii2-number
* v1.0.0
* v1.0.1
*
* Krajee number control jQuery plugin
*
Expand Down Expand Up @@ -41,7 +41,7 @@
init: function () {
var self = this, $elDisp = self.$elDisp, $elSave = self.$elSave, opts = self.options.maskedInputOptions;
$elDisp.off('.numberControl').on('change.numberControl blur.numberControl', function () {
var num = $elDisp.val();
var num = $elDisp.inputmask('unmaskedvalue');
$elSave.val(num).trigger('change');
}).inputmask(opts);
},
Expand Down Expand Up @@ -84,8 +84,7 @@
'digits': 2,
'groupSeparator': ',',
'autoGroup': true,
'autoUnmask': true,
'unmaskAsNumber': true
'autoUnmask': false
}
};
}));
8 changes: 6 additions & 2 deletions assets/js/number.min.js

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

0 comments on commit 9e9fea8

Please sign in to comment.