singularity / yii2-daterangepicker
Date range picker for Yii2 framework
Installs: 287
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 1
Type:yii2-extension
Requires
- npm-asset/daterangepicker: 3.0.3
- yiisoft/yii2: ~2.0.13
- yiisoft/yii2-bootstrap4: ~1.0.0
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-11-02 14:30:45 UTC
README
Renders a Date Range Picker widget.
Installation
The preferred way to install this extension is through composer.
Either run
$ composer require singularity/yii2-daterangepicker:~1.0
or add
"singularity/yii2-daterangepicker": "~1.0"
to the require
section of your composer.json
file.
Usage
Using a model and widget configuration:
use singularity\daterangepicker\Daterangepicker;
...
<div class="col-lg-6">
<div class="form-group">
<?= $form->field($model, 'attribute')->widget(Daterangepicker::class); ?>
</div>
</div>
use singularity\daterangepicker\Daterangepicker;
...
<div class="col-lg-6">
<?= Daterangepicker::widget([
'model' => $model,
'attribute' => 'attribute',
'addonIcon' => 'fal fa-clock',
'clientOptions' => [
'opens' => 'right'
]
]); ?>
</div>
Testing
$ ./vendor/bin/phpunit
Contributing
Please see CONTRIBUTING for details.
Credits
License
The BSD License (BSD). Please see License File for more information.
#InventTomorrow
www.singularity.is