panix/wgt-inputmask

Widget Inputmask

dev-master 2019-05-11 18:12 UTC

This package is auto-updated.

Last update: 2024-04-12 05:20:40 UTC


README

Widget for Yii Framework 2.0 to use Inputmask

Latest Stable Version Total Downloads Monthly Downloads Daily Downloads Latest Unstable Version License

Installation

The preferred way to install this extension is through composer.

Either run

php composer require --prefer-dist panix/wgt-inputmask "*"

or add

"panix/wgt-inputmask": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

echo InputMask::widget([
    'attribute' => 'attribute_name',
    'model' => $model,
    //...
]);

Usage without a model (you must specify the "name" attribute) :

echo $form->field($model, 'attribute_name')->widget(InputMask::class, [
    'extensions' => ['date'],
    'pluginOptions' => [
        'mask' => 'dd/mm/yyyy'
    ]
]);