2017 © Pedro Peláez
 

yii2-extension yii2-autonumeric

autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs.

image

haifahrul/yii2-autonumeric

autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs.

  • Saturday, February 4, 2017
  • by haifahrul
  • Repository
  • 1 Watchers
  • 0 Stars
  • 67 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 4 Versions
  • 6 % Grown

The README.md

AutoNumericJs 1.9.43

autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs., (*1)

Total Downloads, (*2)

Installation

The preferred way to install this extension is through composer., (*3)

Either run, (*4)

php composer.phar require --prefer-dist haifahrul/yii2-autonumeric "*"

or add, (*5)

"haifahrul/yii2-autonumeric": "*"

to the require section of your composer.json file., (*6)

Formatter Settings (optional)

Default the thousandSeparator and decimalSeparator from Yii::$app->formatter, you can settings in your configuration file like below: ``` php 'components' => [ 'formatter' => [ 'class' => 'yii\i18n\formatter', 'thousandSeparator' => '.', 'decimalSeparator' => ',', ] ], (*7)


Usage ----- Once the extension is installed, simply use it in your code by: The complete list of options are below. There are multiple ways of changing the options. To format "123456789.00" to "Rp. 123.456.789" you could do the following: ```php <?= $form->field($model, 'price')->widget(\haifahrul\autonumeric\AutoNumeric::classname(), [ 'value' => $model->price, 'options' => [ 'id' => 'your-id', 'class' => 'your-class', 'readonly' => true, 'disabled' => true, ], 'pluginOptions' => [ 'aSep' => '.', // if you using Formatter Settings, this is not necessary 'aDec' => ',', // if you using Formatter Settings, this is not necessary 'aSign' => 'Rp. ', 'mDec' => '0' // default 2 ] ]); ?>

Other options you can see at http://www.yiiframework.com/doc-2.0/guide-helper-html.html, (*8)

An example and other plugin options, you can see autoNumeric docs: https://github.com/BobKnothe/autoNumeric., (*9)

Thanks to extead. https://github.com/extead, (*10)

The Versions

04/02 2017

dev-master

9999999-dev

autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs.

  Sources   Download

BSD-3-Clause

The Requires

 

by fahrul

yii2 currency extension bootstrap jquery widget auto numeric formatter money format mask unmask bootstrap 3 number autonumeric

27/05 2016

1.2.0

1.2.0.0

autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs.

  Sources   Download

BSD-3-Clause

The Requires

 

by fahrul

yii2 currency extension bootstrap jquery widget auto numeric formatter money format mask unmask bootstrap 3 number autonumeric

24/05 2016

1.1.0

1.1.0.0

autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs.

  Sources   Download

BSD-3-Clause

The Requires

 

by fahrul

yii2 currency extension bootstrap jquery widget auto numeric formatter money format mask unmask bootstrap 3 number autonumeric

23/05 2016

1.0.0

1.0.0.0

autoNumeric is a jQuery plugin that automatically formats currency and numbers as you type on form inputs.

  Sources   Download

BSD-3-Clause

The Requires

 

by fahrul

yii2 currency extension bootstrap jquery widget auto numeric formatter money format mask unmask bootstrap 3 number autonumeric