_form.php
<div class="row">
<?php echo $form->labelEx($model,'svc_date'); ?>
<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model' => $model,
'attribute' => 'svc_date',
'options' => array(
'appendText' => ' - mm/dd/yyyy',
'dateFormat' => 'mm/dd/yy'
)
)); ?>
<?php echo $form->error($model,'svc_date'); ?>
</div>I thought that maybe this was due to input not being an actual date, so I added a conversion event:
protected function beforeSave()
{
if($this->svc_date)
{
$this->svc_date = date('m/d/Y', strtotime($this->svc_date));
}
return parent::beforeSave();
}but this made no difference.
MySQL field is set to DATE

Help












