oakcms / yii2-datetimepicker
Yii2 日期时间小部件
v1.0.0
2016-06-03 16:35 UTC
Requires
- bower-asset/eonasdan-bootstrap-datetimepicker: *
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2024-09-18 19:34:25 UTC
README
Yii2 日期时间小部件
安装
安装此扩展的首选方式是通过 composer.
运行以下命令之一
php composer.phar require --prefer-dist oakcms/yii2-datetimepicker "*"
或者在您的 composer.json
文件的 require 部分添加以下内容:
"oakcms/yii2-datetimepicker": "*"
to the require section of your composer.json
file.
使用方法
扩展安装完成后,您只需在代码中通过以下方式使用它:
use oakcms\yii2-datetimepicker\DateTimeWidget; <?= $form->field($model, 'field')->widget( DateTimeWidget::className(), [ 'phpDatetimeFormat' => 'dd.MM.yyyy, HH:mm' ] ); ?>