Yii Framework Forum: Cjuidatepicker Ajax Problem - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Cjuidatepicker Ajax Problem Rate Topic: -----

#1 User is offline   mme 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 01-October 12

Posted 19 November 2012 - 08:21 AM

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?
0

#2 User is offline   Reinier 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 24-April 12

Posted 19 November 2012 - 08:40 AM

perhaps you can enter the monthnames, or is the calendar itself not good either?
$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
0

#3 User is offline   mme 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 9
  • Joined: 01-October 12

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?
0

#4 User is offline   Reinier 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 10
  • Joined: 24-April 12

Posted 03 December 2012 - 08:49 AM

View Postmme, 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?


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)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users