pickadate.js for Yii2
pickadate.js Extention for Yii2, (*1)
The mobile-friendly, responsive, and lightweight jQuery date & time input picker., (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist perminder-klair/yii2-pickadate "*"
or add, (*5)
"perminder-klair/yii2-pickadate": "*"
to the require section of your composer.json
file., (*6)
Usage
Once the extension is installed, simply use it in your code by :, (*7)
php
<?= \kato\pickadate\Pickadate::widget([
'isTime' => true,
'pickadateOptions' => [
'formatSubmit' => 'HH:i',
],
]); ?>
, (*8)
To use with active form :, (*9)
php
<?= $form->field($model, 'time-field')->widget(\kato\pickadate\Pickadate::classname(), [
'isTime' => true,
'pickadateOptions' => [
'formatSubmit' => 'HH:i',
],
]); ?>
, (*10)