Yii 2 datetime picker demo

1  download kartik from git or composer (https://github.com/kartik-v/yii2-widget-datetimepicker) 

$ php composer.phar require kartik-v/yii2-widget-datetimepicker "*"

 

2. view code

use kartik\datetime\DateTimePicker;

<?= $form->field($model, 'u_expiredDate')->widget(DateTimePicker::className(), [
    'pluginOptions' => [
        'format' => 'yyyy-mm-dd hh:ii:ss',
        'autoclose' => true,
    ]     

]) ?>