0

At first I created migrations for table called 'board-directors' and in this table their column his name 'start_date' it's date after I generator with Yii2 I/O Generator their no DatePicker in form

this code in board-directors->_form

?= $form->field($model, 'start_date')->widget(\kartik\datecontrol\DateControl::classname(), [
        'type' => \kartik\datecontrol\DateControl::FORMAT_DATETIME,
        'saveFormat' => 'php:Y-m-d H:i:s',
        'ajaxConversion' => true,
        'options' => [
            'pluginOptions' => [
                'placeholder' => Yii::t('app', 'Choose Start Date'),
                'autoclose' => true,
            ]
        ],
    ]); ?>

enter image description here

theduck
  • 2,589
  • 13
  • 17
  • 23

0 Answers0