I am using a CJUIDatePicker widget in one of my Yii Forms generated through GII in order to simply the users data entry aspect. However it only enters 00:00:00 into the database.
In my view file,
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model'=>$model,
'attribute'=>'purchaseDate',
));
?>
In the controller actionCreate,
$model=new Patient_meals;
if(isset($_POST[‘Patient_meals’])){
$model->attributes=$_POST['Patient_meals'];
if($model->save())
$this->redirect(array('view','id'=>$model->patientId));
}
$this->render(‘create’,array(‘model’=>$model,));
I also used an autocomplete widget in another form using CJUIAutoComplete, but when I submit the records it mentions that addressCity cannot be blank, despite it being filled
$this->widget(‘zii.widgets.jui.CJuiAutoComplete’,array(
'name'=>'addressCity',
'source'=>array('A','B','C','D','E'),
));
In the actionCreate method
$model=new Patient_details;
if(isset($_POST[‘Patient_details’])){
$model->attributes=$_POST['Patient_details'];
if($model->save())
$this->redirect(array('view','id'=>$model->patientId));
}
$this->render('create',array('model'=>$model,));
Any ideas on how this could be fixed