Yii2 DateTime Widget
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist oakcms/yii2-datetimepicker "*"
or add
"oakcms/yii2-datetimepicker": "*"
to the require section of your composer.json
file.
Once the extension is installed, simply use it in your code by :
use oakcms\yii2-datetimepicker\DateTimeWidget;
<?= $form->field($model, 'field')->widget(
DateTimeWidget::className(),
[
'phpDatetimeFormat' => 'dd.MM.yyyy, HH:mm'
]
);
?>