2017 © Pedro Peláez
 

yii2-extension yii2-number

Number control and format mask input for Yii2 Framework.

image

izisoft/yii2-number

Number control and format mask input for Yii2 Framework.

  • Wednesday, May 23, 2018
  • by zinzinx8
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

yii2-number

Latest Stable Version Latest Unstable Version License Total Downloads Monthly Downloads Daily Downloads, (*1)

Note

This extension replaces the yii2-money extension since Jan 2018. The yii2-money extension will not be enhanced further or supported., (*2)

A number control input for Yii2 Framework that uses the jQuery input mask plugin (available also via yii/widgets/MaskedInputAsset) to render number input masks. This extension is similar to the DateControl extension for dates, and allows one to control the display and save formats for numbers. The extension thus allows one to setup a number format display mask, use currency prefixes if needed, and modify the decimals and thousand separators. It lastly allow the display fields to be auto calculated as numbers when stored into the database., (*3)

Refer detailed documentation and demos., (*4)

Latest Release

The latest version of the module is v1.0.1. Refer the CHANGE LOG for details., (*5)

Install

Either run, (*6)

$ php composer.phar require izisoft/yii2-number "@dev"

or add, (*7)

"izisoft/yii2-number": "@dev"

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

Usage

use kartik\number\NumberControl;

// Normal decimal
echo NumberControl::widget([
    'name' => 'normal-decimal',
    'value' => 43829.39,
]);

// Integer only
echo NumberControl::widget([
    'name' => 'integer-only',
    'value' => 32892,
    'maskedInputOptions' => ['digits' => 0],
]);

// Currency style with prefix and suffix
echo NumberControl::widget([
    'name' => 'currency-num',
    'value' => 2018032.22,
    'maskedInputOptions' => ['prefix' => '$ ', 'suffix' => ' c'],
]);

// Usage with model 
$model->currency = 1298132.23;
echo NumberControl::widget([
    'model' => $model,
    'attribute' => 'currency',
    'maskedInputOptions' => ['prefix' => '$ ', 'suffix' => ' c'],
]);

License

yii2-number is released under the BSD-3-Clause License. See the bundled LICENSE.md for details., (*9)

Xem thêm các dự án viết bằng yii framework

Kho hàng US - Dịch vụ đặt hàng Mỹ số 1 Việt Nam, (*10)

Mỹ phẩm cao cấp Hàn Quốc Amaranth - Sorabee - Bello Vita, (*11)

Chia sẻ kinh nghiệm lập trình php - vps - hosting, (*12)

Chia sẻ coupon khuyến mãi từ các trang thương mại điện tử hàng đầu tại Việt Nam và trên toàn thế giới, (*13)

EMZ - Mua gì cũng có, (*14)

Thao Chip Shop, Chuyên bán buôn, bán lẻ đồ ngủ nữ, (*15)

The Versions

23/05 2018

dev-master

9999999-dev https://github.com/izisoft/yii2-number

Number control and format mask input for Yii2 Framework.

  Sources   Download

BSD-3-Clause

The Requires

 

extension yii2 widget currency mask format number number control