Hi, All,
I want to add a datepicker (like CJuiDatePicker) into one element in CForm.
My code is not working. I must be missing something but I don't know.
Is anyone has same issue, and I want to know how you solve the issue.
Thanks,
Johnny
I want to add a datepicker (like CJuiDatePicker) into one element in CForm.
public function getForm() { $return=new CForm(array( 'showErrorSummary'=>true, 'elements'=>array( 'networkDate'=>array( 'type'=>'text', 'hint'=>'Date for network', 'attributes'=>array( 'class'=>'hasDatepicker', ), ), "<script type=\"text/javascript\"> /*<![CDATA[*/ jQuery(function($) { jQuery('#NetworkDetails_networkDate').datepicker({'changeYear':true,'dateFormat':'mm/dd/yy'}); } /*]]>*/ </script>", ...
My code is not working. I must be missing something but I don't know.
Is anyone has same issue, and I want to know how you solve the issue.
Thanks,
Johnny