bupy7 / yii2-date-range-picker
Wrapper of bootstrap date range picker for Yii2.
Installs: 70
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- bower-asset/bootstrap-daterangepicker: ~2.1
- yiisoft/yii2: *
- yiisoft/yii2-bootstrap: *
This package is not auto-updated.
Last update: 2020-01-24 16:03:21 UTC
README
Wrapper of bootstrap date range picker for Yii2.
More information about plugin: https://github.com/dangrossman/bootstrap-daterangepicker
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist bupy7/yii2-date-range "*"
or add
"bupy7/yii2-date-range": "*"
to the require section of your composer.json
file.
Usage
As field of form:
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' => [ ], ]);
As an independent widget:
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' => [ ], ]);
##License
yii2-date-range-picker is released under the BSD 3-Clause License.