beaten-sect0r/yii2-flatpickr
最新稳定版本:2.0.1
Composer 安装命令:
composer require beaten-sect0r/yii2-flatpickr
包简介
Datetime picker widget for Yii2 framework
README 文档
README
Click on a ⭐!
Flatpickr is a lightweight and powerful datetime picker.
Installation
The preferred way to install this extension is through composer.
Either run
composer require --prefer-dist beaten-sect0r/yii2-flatpickr "*"
or add
"beaten-sect0r/yii2-flatpickr": "*"
to the require section of your composer.json file.
Usage
<?php use bs\Flatpickr\FlatpickrWidget; ?> <?= $form->field($model, 'published_at')->widget(FlatpickrWidget::class, [ 'locale' => strtolower(substr(Yii::$app->language, 0, 2)), // https://chmln.github.io/flatpickr/plugins/ 'plugins' => [ 'confirmDate' => [ 'confirmIcon'=> "<i class='fa fa-check'></i>", 'confirmText' => 'OK', 'showAlways' => false, 'theme' => 'light', ], ], 'groupBtnShow' => true, 'options' => [ 'class' => 'form-control', ], 'clientOptions' => [ // config options https://chmln.github.io/flatpickr/options/ 'allowInput' => true, 'defaultDate' => $model->published_at ? date(DATE_ATOM, $model->published_at) : null, 'enableTime' => true, 'time_24hr' => true, ], ]) ?>
统计信息
- 总下载量: 9.95k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 17
- 点击次数: 1
- 依赖项目数: 2
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2016-11-16