kukla-svitla/yii2-datetime-picker-widget
最新稳定版本:1.0.0
Composer 安装命令:
composer require kukla-svitla/yii2-datetime-picker-widget
包简介
Date and time picker
README 文档
README
This yii2 extension is a wrapper for the powerful jQuery date-time picker
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist kukla-svitla/yii2-datetime-picker-widget "*"
or add
"kukla-svitla/yii2-datetime-picker-widget": "*"
to the require section of your composer.json file.
Usage
This widget renders a input control with datetime picker.
You can use is like a separate widget or with ActiveField instance.
<?= \svitla\dateTimePicker\Widget::widget([ // you need specify model and attribute 'model' => $model, 'attribute' => 'posted', // or name of the input and value (if needed) //'value' => '2016/01/22 18:26', //'name' => 'specific-name', 'mode' => \svitla\dateTimePicker\Widget::MODE_DATE, // for only date picker // or \svitla\dateTimePicker\Widget::MODE_TIME for time picker // default is datetime picker 'language' => 'ru', 'options' => [ // html options of the input 'class' => 'my-class', ], 'clientOptions' => [ 'theme' => 'dark', 'minDate' => '05.12.2013', 'formatDate' => 'd.m.Y', ] ]) ?> <?= $form->field($model, 'start_time')->widget(\svitla\dateTimePicker\Widget::className(), [ 'language' => 'ru', 'mode' => \svitla\dateTimePicker\Widget::MODE_TIME, 'options' => [ 'class' => 'my-class', ], 'clientOptions' => [ 'theme' => 'dark', 'minDate' => '05.12.2013', 'formatDate' => 'd.m.Y', ] ]) ?>
License
yii2-datetime-picker-widget is released under the MIT License. See the bundled LICENSE for details.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-10-15