Wizardbehavior + Cjuidatepicker?

I am using WizardBehaviour and in step 3 I have some date fields.

I define the form fields for each step inside the MyWizardModel as an array.


// for step 3

  return array(

    'title'=>'Step - 3',




 	//'visible'=> true,

	//'onfocus'=>'alert("select"); $("#ContractWizard_startDate").datepicker();',



 	'hint'=>'Format expected ('.Yii::app()->locale->getDateFormat('short').')'



 	'hint'=>'Format expected ('.Yii::app()->locale->getDateFormat('short').')'



	'cancel'=>array( 'type'=>'submit', 'label'=>'Cancel' ),

	'submit'=>array( 'type'=>'submit', 'label'=>'Next' ),



In the controller I retrieve the config for the form step, populate any values that are missing, and pass it to the view.

In my view I use:

echo CHtml::tag( 'div', array('class'=>'form'), $form );

Is there a ‘clean’ way to link the field definition (in the model array) to CJuiDatePicker ?

[color="#006400"]/* Moved to Extensions */[/color]

getting closer…


but this doesn’t work for me. I don’t get any errors, but the datepopup does not trigger.

I solved it finally. I’d put in a load of extra stuff before I found the link above. Now that I’ve removed all the unwanted code and reduced the functionality it works nicely.

I got same issue, and it solved under KonApaz’s help. If you want to see my code, use below link to the post: