Inavlid Date Formate When Using Date Validation With Cjuidatepicker

hi every body

take a look at this code in rules for date validation


in my view file i use CJuiDatePicker like the following

	<div class="row">

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

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

    'model'=>$model, 'attribute'=>'start_publish',




)) ?>

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


but when i submit it give invalid date format

so what where is the error ?

Hi this is your code notice i changed the format to dd/MM/yyyy

but i would encourage you to use the fowllowing

check ur database date format and rules in the model.

thanks for all replay

my database date setup is int(11) as i store time as timestamp you will notic that i set ‘timestampAttribute’=>‘start_publish’

at last nothing works even when changing date format

notice that i’ve checked the posted parameter to ensure posting date in the proper format and it is

any idea ?

hay i’ve found what’s error

i changed date format with a code after massive assignment of the form so it’s delivered in timestamp before validation

thanks for all