2017 © Pedro Peláez
 

yii2-extension yii2-formattednumber

Yii2 Formatter number input

image

grenhaz/yii2-formattednumber

Yii2 Formatter number input

  • Tuesday, March 20, 2018
  • by grenhaz
  • Repository
  • 0 Watchers
  • 0 Stars
  • 1 Installations
  • JavaScript
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

Formatted Number Extension for Yii 2

For license information check the LICENSE-file., (*1)

Installation

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

Either run, (*3)

php composer.phar require --prefer-dist grenhaz/yii2-formattednumber

or add, (*4)

"grenhaz/yii2-formattednumber": "~1.0.0"

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

Basic Usage

<?= $form->field( $model, 'number' )
        ->widget( FormattedNumberWidget::classname(), [
            "plugin" => [
                "decimals" => 2
            ]
        ] ) ?>

Example

Example, (*6)

Configuration

  • decimals - Number of decimals to show. default: 2
  • thousandSeparator - Thousand separator character. default: (empty)
  • decimalSeparator - Decimal separator character. default: .
  • emptyAllowed - Allow empty values. default: true
  • forceDecimals - Force to show or not all decimals. default: true
  • align - Text alignment. default: right

The Versions

20/03 2018

dev-master

9999999-dev

Yii2 Formatter number input

  Sources   Download

MIT

The Requires

 

format number

19/03 2018

1.0.0

1.0.0.0

Yii2 Formatter number input

  Sources   Download

MIT

The Requires

 

format number