Hi all,
I have a page that includes many date fields so I have decided that I would like to use the CJuiDatePicker widget to make the data entry process quicker.
I have successfully included the widget on some fields but I have noticed that I am including the same widget options each time I call the widget. These options include date format, select other months & change year etc. and including them each time seems like a waste of code.
With this in mind I have looked at the main CJuiDatePicker.php file and wondered if these options can be put in that file so whenever the widget is called those options are already set.
I have added the following code into the file:
public $defaultOptions = array(
'language'=> '',
'dateFormat' => 'yy-mm-dd',
'selectOtherMonths' => true,
'changeYear' => true,
'changeMonth' => true,
);
Now when I call the widget I just do this in the view file:
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model' => $model,
'attribute' => 'pr_date_proof_sent')
);
The problem I am having is that the widget is appearing in Chinese. I have looked into this issue and everything I have read states that the language option should fix it.
Has anyone any experience with the DatePicker widget and able to offer a solution to this problem?
Many thanks