PHPackages                             izisoft/yii2-number - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. izisoft/yii2-number

ActiveYii2-extension[Utility &amp; Helpers](/categories/utility)

izisoft/yii2-number
===================

Number control and format mask input for Yii2 Framework.

04PHP

Since Oct 11Pushed 7y ago1 watchersCompare

[ Source](https://github.com/izisoft/yii2-number)[ Packagist](https://packagist.org/packages/izisoft/yii2-number)[ RSS](/packages/izisoft-yii2-number/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

yii2-number
===========

[](#yii2-number)

[![Latest Stable Version](https://camo.githubusercontent.com/0e367da5636436ff18052b758bc1cb2e8fe43bd487ae1f33d98af4cc0c97d449/68747470733a2f2f706f7365722e707567782e6f72672f697a69736f66742f796969322d6e756d6265722f762f737461626c65)](https://packagist.org/packages/izisoft/yii2-number)[![Latest Unstable Version](https://camo.githubusercontent.com/b4b35d12d8d743b9607632737990eb2678082cc40fcb11d3b4808f0210c63cd0/68747470733a2f2f706f7365722e707567782e6f72672f697a69736f66742f796969322d6e756d6265722f762f756e737461626c65)](https://packagist.org/packages/izisoft/yii2-number)[![License](https://camo.githubusercontent.com/5ce606de6f9da683fda9002ae755720cf6f618b416ae9ea252e8e46998211ee2/68747470733a2f2f706f7365722e707567782e6f72672f697a69736f66742f796969322d6e756d6265722f6c6963656e7365)](https://packagist.org/packages/izisoft/yii2-number)[![Total Downloads](https://camo.githubusercontent.com/67eed9edf06b059318ff478b8230f6484c8bfd8f657e4cda84cdc4d361bcee76/68747470733a2f2f706f7365722e707567782e6f72672f697a69736f66742f796969322d6e756d6265722f646f776e6c6f616473)](https://packagist.org/packages/izisoft/yii2-number)[![Monthly Downloads](https://camo.githubusercontent.com/2eb39729507e190c96dc64587698b59a5e76ed5a6fbd851eacae0c45e01e099d/68747470733a2f2f706f7365722e707567782e6f72672f697a69736f66742f796969322d6e756d6265722f642f6d6f6e74686c79)](https://packagist.org/packages/izisoft/yii2-number)[![Daily Downloads](https://camo.githubusercontent.com/e0a3d4bf8ec4e9d3a967ce2db8be1330b1c7bc6f86b73d118980d23be949e819/68747470733a2f2f706f7365722e707567782e6f72672f697a69736f66742f796969322d6e756d6265722f642f6461696c79)](https://packagist.org/packages/izisoft/yii2-number)

> ### Note
>
> [](#note)
>
> This extension replaces the [yii2-money](https://github.com/izisoft/yii2-money) extension since Jan 2018. The [yii2-money](https://github.com/izisoft/yii2-money) extension will not be enhanced further or supported.

A number control input for Yii2 Framework that uses the [jQuery input mask plugin](https://github.com/RobinHerbots/Inputmask) (available also via `yii/widgets/MaskedInputAsset`) to render number input masks. This extension is similar to the [DateControl extension](http://demos.krajee.com/datecontrol) 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.

Refer [detailed documentation and demos](http://demos.krajee.com/number).

Latest Release
--------------

[](#latest-release)

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

### Install

[](#install)

Either run

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

```

or add

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

```

to the `require` section of your `composer.json` file.

Usage
-----

[](#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
-------

[](#license)

**yii2-number** is released under the BSD-3-Clause License. See the bundled `LICENSE.md` for details.

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

[](#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](https://www.khohangus.com)

[Mỹ phẩm cao cấp Hàn Quốc Amaranth - Sorabee - Bello Vita](https://www.amaranth.com.vn)

[Chia sẻ kinh nghiệm lập trình php - vps - hosting](https://www.truongbui.com)

[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](https://www.phutchot.com)

[EMZ - Mua gì cũng có](https://www.emz.vn)

[Thao Chip Shop, Chuyên bán buôn, bán lẻ đồ ngủ nữ](https://thaochip.com)

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/2edf0df855a366ea51f96bd910a60c87320c973460ccc273a7e448ae32eedb65?d=identicon)[zinzinx8](/maintainers/zinzinx8)

---

Top Contributors

[![zinzinx8](https://avatars.githubusercontent.com/u/13455399?v=4)](https://github.com/zinzinx8 "zinzinx8 (6 commits)")

### Embed Badge

![Health badge](/badges/izisoft-yii2-number/health.svg)

```
[![Health](https://phpackages.com/badges/izisoft-yii2-number/health.svg)](https://phpackages.com/packages/izisoft-yii2-number)
```

###  Alternatives

[ishanvyas22/asset-mix

Asset Mix plugin for CakePHP

3375.4k2](/packages/ishanvyas22-asset-mix)[prgayman/laravel-zatca

Laravel package a helper to Generate the QR code and signed it for ZATCA E-invoicing

2926.9k1](/packages/prgayman-laravel-zatca)[ducks-project/spl-types

Polyfill Module for SplType PHP extension. This extension aims at helping people making PHP a stronger typed language and can be a good alternative to scalar type hinting. It provides different typehandling classes as such as integer, float, bool, enum and string

1032.4k](/packages/ducks-project-spl-types)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
