kartik-v/yii2-number

Problem with 3 digits

Closed this issue · 1 comments

i think i have found a bug in yii2-number.

I'm working with 3 digits but there is a problem with the maskedInput when it's 3 digits, when i put for example 144.427 as a default value, groupSeparator =>'.' and 'radixPoint' => ',' the number that appear in input it's "144.427" and not "144,427". And if i put "144.42" the number that appear in input it's "144,42" that is correct.

My code:
echo NumberControl::widget([
'name' => 'test',
'value' => 144.427,
'maskedInputOptions' => [
'suffix' => ' %',
'groupSeparator' => '.',
'radixPoint' => ',',
'digits' => 3,
],
]);
?>

OK for some reason I had an old version of yii2-number...
I did the update and it works now.