I'm loading a form which contains a CJuiDatepicker with ajax.
I set the language to 'de' (german) but when it gets loaded the datepicker is chinese.
Is there some kind of workaround for this?
Page 1 of 1
Cjuidatepicker Ajax Problem
#2
Posted 19 November 2012 - 08:40 AM
perhaps you can enter the monthnames, or is the calendar itself not good either?
Only there is an example which is in German completely, but you have to convert from jQuery => Yii
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'name'=>'Lijst[datum_event]',
'value'=>$model->datum_event,
'theme'=>'ui-lightness',
// additional javascript options for the date picker plugin
'options'=>array(
'showAnim' =>'fold',
'dateFormat' => 'yy-mm-dd', // save to db format
'showWeek' => true,
'firstDay' => 1,
'monthNames' => array('Januari', 'Februari', 'Maart', 'April', 'Mei', 'Juni',
'Juli', 'Augustus', 'September', 'Oktober', 'November', 'December'),
'monthNamesShort' => array('Jan', 'Feb', 'Mär', 'Apr', 'Mai', 'Jun',
'Jul', 'Aug', 'Sep', 'Okt', 'Nov', 'Dez'),
'dayNames' => array('Suntag', 'Maandag', 'Dinsdag', 'Mitwoche', 'Donderdag', 'Vrijdag', 'Zaterdag'),
'dayNamesShort' => array('Zo', 'Ma', 'Di', 'Wo', 'Do', 'Vr', 'Za'),
'dayNamesMin' => array('Zo', 'M', 'Di', 'Wo', 'Do', 'Vr', 'Za'),
),
'htmlOptions'=>array(
'id'=>'datum_event',
),
));Only there is an example which is in German completely, but you have to convert from jQuery => Yii
#3
Posted 19 November 2012 - 09:01 AM
Thank you, the only Chinese symbol which now remains is after the Year (年).
Another problem: I'm selecting which form to load and replace the content of a div with .html (jquery)
This causes an action from an ajax button to be send once for every previous form load.
It seems to me like the .click is added multiple times.
How can I ensure this does not happen?
Another problem: I'm selecting which form to load and replace the content of a div with .html (jquery)
This causes an action from an ajax button to be send once for every previous form load.
It seems to me like the .click is added multiple times.
How can I ensure this does not happen?
#4
Posted 03 December 2012 - 08:49 AM
mme, on 19 November 2012 - 09:01 AM, said:
Thank you, the only Chinese symbol which now remains is after the Year (年).
Another problem: I'm selecting which form to load and replace the content of a div with .html (jquery)
This causes an action from an ajax button to be send once for every previous form load.
It seems to me like the .click is added multiple times.
How can I ensure this does not happen?
Another problem: I'm selecting which form to load and replace the content of a div with .html (jquery)
This causes an action from an ajax button to be send once for every previous form load.
It seems to me like the .click is added multiple times.
How can I ensure this does not happen?
To avoid multiple Ajax requests please take a look at:
http://www.yiiframew...e-ajax-request/
It took a while for me to deal with this. Another nice one is:
http://www.yiiframew...on/zcontroller/
To change the Year tag, is not known for me, perhaps you should have a look at the jQuery website.
Does your language of your application is right configured? (config>main.php)
Share this topic:
Page 1 of 1

Help











