Hello World!
i am trying to add the DateTimePicker widget to my active form but i am getting null every time in the database in that field, i don't know why i tried to change the format but it's not working any thoughts please?
View
<?php echo DateTimePicker::widget(
[
'model' => $data['model'],
'attribute' => 'expire_date',
'options' => ['placeholder' => 'Select operating time ...'],
'convertFormat' => true,
'pluginOptions' => [
'format' => 'y-m-d h:m:s',
// 'startDate' => '01-Mar-2014 12:00 AM',
'todayHighlight' => true
]
]
)?>
Controller
public function actionAddjob()
{
if(!Yii::$app->user->isGuest){
$data['model'] = new Job();
return $this->render('addjob', compact('data'));
} else {
$this->goHome();
}
}