singularity/yii2-daterangepicker

Date range picker for Yii2 framework

1.0 2019-04-11 11:41 UTC

This package is not auto-updated.

Last update: 2024-11-02 14:30:45 UTC


README

Latest Version Software License Build Status Coverage Status Quality Score Total Downloads

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