aayaresko/yii2-widget-maskedinputdatepicker
最新稳定版本:v1.0.1-alpha
Composer 安装命令:
composer require aayaresko/yii2-widget-maskedinputdatepicker
包简介
Yii2 widget that allow using of inputmask jquery plugin in conjunction with datepicker jquery plugin
README 文档
README
Implements inputMask jquery plugin in conjunction with DatePicker jquery plugin
Widget InputMask in Conjunction with DatePicker (using jquery plugins).
Creates a DatePicker field with InputMask in specified via maskedInputOptions['mask'] format.
Installation
The preferred way to install extension is via composer. Check the composer.json for this extension's requirements and dependencies.
To install, either run
$ php composer.phar require aayaresko/yii2-widget-maskedinputdatepicker "*"
or add
"aayaresko/yii2-widget-maskedinputdatepicker": "*"
to the require section of your composer.json.
Usage
Upload all necessary components and prepare widget
use aayaresko\date\MaskedInputDatePicker
echo MaskedInputDatePicker::widget([ 'enableMaskedInput' => true, 'maskedInputOptions' => [ 'mask' => '99.99.9999', 'pluginEvents' => [ 'complete' => "function(){console.log('complete');}" ] ], 'name' => 'dp_3', 'type' => MaskedInputDatePicker::TYPE_COMPONENT_APPEND, 'value' => '23.09.1982', 'pluginOptions' => [ 'autoclose'=>true, 'format' => 'dd.M.yyyy' ] ]);
Important
Values of fields format, value and mask must be the same
Configure plugin via parameters:
- enableMaskedInput - whether to use InputMask or not (default false - do not use)
- maskedInputOptions - inputmask jquery plugin configuration parameters, it must contain the arrays:
- 'pluginOptions' - jquery plugin settings;
- 'pluginEvents' - jquery plugin events;
- 'mask' - input mask.
License
yii2-widget-maskedinputdatepicker is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.
统计信息
- 总下载量: 2.42k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 4
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD
- 更新时间: 2015-07-08