andrew72ru / yii2-bootstrap-datepicker-mobile
基于 https://github.com/niftylettuce/bootstrap-datepicker-mobile 的为 Yii2 定制的移动优先日期选择器
0.0.2
2016-02-11 12:39 UTC
Requires
- bower-asset/bootstrap-datepicker-mobile: *
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-09-23 01:14:15 UTC
README
基于 https://github.com/niftylettuce/bootstrap-datepicker-mobile 的为 Yii2 定制的移动优先日期选择器
安装
安装此扩展的首选方法是通过 composer.
运行以下命令之一
php composer.phar require --prefer-dist andrew72ru/yii2-bootstrap-datepicker-mobile "*"
或在您的 composer.json
文件的 require 部分添加
"andrew72ru/yii2-bootstrap-datepicker-mobile": "*"
使用方法
扩展安装后,只需在代码中通过以下方式使用即可
<?= $form->field($model, 'date')->widget(\andrew72ru\datepicker\DatePicker::className(), [ 'options' => [], // Html tag options 'pluginOptions' => [ 'date-start-view' => 'day', 'date-format' => 'dd.mm.yy', 'date' => \Yii::$app->formatter->asDate(time(), 'MM/dd/yy'), ], ]); ?>