CJuiDatePicker not saving to database

I am having issues getting the datepicker to save to the database, everything seems to work, I dont get any errors, but the date does not get saved. I have the following in my _form :




<?php echo $form->labelEx($model,'INSTALL_DATE'); ?> 

<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array( 

	'name'=>'INSTALL_DATE',

	'model'=>$model,

	'attribute'=>'INSTALL_DATE',

	'value'=>$model->INSTALL_DATE, 

	

	// additional javascript options for the date picker plugin 

	'options'=>array( 

		'showAnim'=>'fold', 

		'dateFormat'=>'yy-mm-dd', 

		), 

	'htmlOptions'=>array( 

		'style'=>'height:20px;'

		), 

	)); ?> 

<?php echo $form->error($model,'INSTALL_DATE'); ?> 



Please let me know if I have somthing wrong here.

Nevermind, I figured out I dont need the name property.

You please check your model’s rule. For date you will need the following rules


array('date', 'type', 'type' => 'date', 'message' => '{attribute}: is not a date!', 'dateFormat' => 'yyyy-MM-dd'),

Best of luck

Still can’t save at database :(

Can u show me your model??