perminder-klair/yii2-pickadate

pickadate.js Extention for Yii2

dev-master 2014-04-30 16:29 UTC

This package is not auto-updated.

Last update: 2024-11-09 16:32:21 UTC


README

pickadate.js Extention for Yii2

The mobile-friendly, responsive, and lightweight jQuery date & time input picker.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist perminder-klair/yii2-pickadate "*"

or add

"perminder-klair/yii2-pickadate": "*"

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code by :

<?= \kato\pickadate\Pickadate::widget([
      'isTime' => true,
      'pickadateOptions' => [
          'formatSubmit' => 'HH:i',
      ],
  ]); ?>```


To use with active form :

```php
<?= $form->field($model, 'time-field')->widget(\kato\pickadate\Pickadate::classname(), [
    'isTime' => true,
    'pickadateOptions' => [
        'formatSubmit' => 'HH:i',
    ],
]); ?>```