Jui datepicker with not required date field


I have model ‘date_start’ field and I want to use CJuiDatePicker widget to set up date.

		<?php echo $form->labelEx($advertisement,'date_start'); ?>

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





		<?php echo $form->error($advertisement,'date_start'); ?>

When I set ‘date_start’ field as required everything works great, but if I unset required validator from this field it does not remember date value after validate:( Is this datepicker widget bug or I miss something?

You will have to use a ‘safe’ validator.

Read more in the Definitive Guide To Yii.


Thank’s Tommy.