panix / wgt-inputmask
Widget Inputmask
Installs: 23
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
This package is auto-updated.
Last update: 2024-11-12 06:47:23 UTC
README
Widget for Yii Framework 2.0 to use Inputmask
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' ] ]);