bupy7/yii2-date-range-picker

此包已被放弃且不再维护。未建议替代包。

用于 Yii2 的 Bootstrap 日期范围选择器包装器。

安装: 70

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 1

分支: 0

开放问题: 0

类型:yii2-extension

v1.0.1 2015-12-12 12:53 UTC

This package is not auto-updated.

Last update: 2020-01-24 16:03:21 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

用于 Yii2 的 Bootstrap 日期范围选择器包装器。

有关插件的更多信息: https://github.com/dangrossman/bootstrap-daterangepicker

安装

通过 composer 安装此扩展是首选方式。

运行以下命令之一:

php composer.phar require --prefer-dist bupy7/yii2-date-range "*"

或添加以下内容到您的 composer.json 文件的 require 部分:

"bupy7/yii2-date-range": "*"

to the require section of your composer.json file.

使用方法

作为表单字段

echo $form->field($model, 'date_range')->widget(DateRangePicker::className(), [
    'pluginOptions' => [
        // see http://www.daterangepicker.com/#options
    ],

    'pluginEvents' => [
        // see http://www.daterangepicker.com/#events
    ],

    // Language of plugin. If `null` then `\yii\base\Application::language` will be used.
    'language' => 'ru',

    // Converting date format from PHP DateTime to Moment.js DateTime.
    'convertDateFormat' => true,

    // Options of field input.
    'options' => [

    ],
]);

作为独立的控件

DateRangePicker::widget([
    'name' => 'date_time',

    'pluginOptions' => [
        // see http://www.daterangepicker.com/#options
    ],

    'pluginEvents' => [
        // see http://www.daterangepicker.com/#events
    ],

    // Language of plugin. If `null` then `\yii\base\Application::language` will be used.
    'language' => 'ru',

    // Converting date format from PHP DateTime to Moment.js DateTime.
    'convertDateFormat' => true,

    // Options of field input.
    'options' => [

    ],
]);

##许可证

yii2-date-range-picker 采用 BSD 3-Clause 许可证发布。