pcrt/yii2-datepicker

Yii2-datepicker widget based on TempusDomini

Installs: 897

Dependents: 2

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

0.9.3 2020-01-28 11:02 UTC

This package is auto-updated.

Last update: 2024-10-28 19:57:30 UTC


README

Daterangepicker gives you a customizable daterangepicker with support for multidate, time, localization and many other highly used options.

##Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require pcrt/yii2-datepicker "*"

or add

"pcrt/yii2-datepicker": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, modify your application configuration to include:

use pcrt\widgets\datepicker\Datepicker:


// with \yii\bootstrap\ActiveForm;
echo $form
    ->field($model, 'attribute')
    ->widget(
        Datepicker::class,
        [
          'clientOptions' => [
            'singleDatePicker' => true,
            'showDropdowns' => true,
          ]
        ]
    );

// as widget
echo Datepicker::widget([
    'clientOptions' => [
      'showDropdowns' => true,
    ]
]);

License

Yii2-Datepicker is released under the BSD-3 License. See the bundled LICENSE.md for details.

Enjoy!