Datepicker
, (*1)
Yii2 DatePicker jquery ui with style like bootstrap., (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either add, (*4)
"require": {
"keygenqt/yii2-datepicker": "*"
},
of your composer.json
file., (*5)
Usage
View:, (*6)
use keygenqt\datePicker\DatePicker;
= DatePicker::widget([
'model' => $model,
'attribute' => 'updated',
'language' => 'en-US',
'dateFormat' => 'php:d-M-Y',
'clientOptions' => [
'showOtherMonths' => true,
'selectOtherMonths' => true,
'dayNamesMin' => array('S', 'M', 'T', 'W', 'T', 'F', 'S')
]
]) ?>
View:, (*7)
use keygenqt\datePicker\DatePicker;
= $form->field($model, 'date')->widget(DatePicker::className(), [
'placeholder' => 'Date',
'icon' => false,
'selectDay' => false,
'dateFormat' => 'php:F, Y'
]); ?>
Screenshot
, (*8)