Yii2 DateTimePicker
Datetimepicker widget for Yii2 framework
Based on https://github.com/Eonasdan/bootstrap-datetimepicker, (*1)
NOTE Here might be some bugs or follies. Contribute to remove them ;), (*2)
Installation
The preferred way to install this extension is through composer., (*3)
Either run, (*4)
php composer.phar require --prefer-dist trntv/yii2-bootstrap-datetimepicker "*"
or add, (*5)
"trntv/yii2-bootstrap-datetimepicker": "*"
to the require section of your composer.json
file., (*6)
Usage
Once the extension is installed, simply use it in your code by :, (*7)
<?= $form->field($model, 'attribute')->widget('trntv\yii\datetimepicker\DatetimepickerWidget'); ?>
Options
phpDatetimeFormat
- PHP ICU datetime format, (*8)
momentDatetimeFormat
- Moment JS datetime format, (*9)
clientOptions
- http://eonasdan.github.io/bootstrap-datetimepicker/#options, (*10)