jino5577/yii2-date-range-picker 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

jino5577/yii2-date-range-picker

最新稳定版本:1.0.0

Composer 安装命令:

composer require jino5577/yii2-date-range-picker

包简介

Yii 2 date range picker input based on Dan Grossman daterangepicker plugin.

README 文档

README

Date range picker input for Yii Framework 2 based on Dan Grossman's bootstrap-daterangepicker.

Features:

Installation

The preferred way to install this extension is through composer.

To install, either run

$ php composer.phar require jino5577/yii2-date-range-picker "*"

or add

"jino5577/yii2-date-range-picker": "*"

to the require section of your composer.json file.

Usage

use jino5577\daterangepicker\DateRangePicker;

echo DateRangePicker::widget([
    'model'     => $model,
    'attribute' => 'dateRange',
    
    // Optional. Used for calendar localization. 
    // IF `null` (default), default moment.js language will be used.
    'locale'    => 'ru-RU';
    // Daterange plugin options. Default is `null`.
    // See http://www.daterangepicker.com/#options
    'pluginOptions' => [
        /* ... */
        'autoUpdateInput' => false,
    ],
    // Optional. If maskOptions is set, MaskedInput will be used 
    // instead of TextInput. Default is `null`. 
    'maskOptions' => [
        'mask' => '99/99/9999 - 99/99/9999',
    ],
    // Optional. Input control options, 
    // default is `['class' => 'form-control']`.
    'options' => [
        /* ... */
    ],
    // Optional. Widget template, default is `{input}`. 
    // The special tag `{input}` will be replaced with the form input. 
    'template' => '
        <div class="input-group">
            <span class="input-group-addon">
                <span class="glyphicon glyphicon-calendar"></span>
             </span>
            {input}
        </div>
    '
    ],
    // Optional. Javascript callback to be passed to the 
    // plugin constructor. By default, updates the input 
    // and triggers `change` event.
    'callback' => 'function() { /* ... */ }';   
]);

License

BSD 3-Clause License. Please see bundled LICENSE.md file for more information.

统计信息

  • 总下载量: 92.23k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 4
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 4
  • Watchers: 2
  • Forks: 5
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-10-15