Yii Framework Forum: Cjuidatepicker En-Us - Yii Framework Forum

Jump to content

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

Cjuidatepicker En-Us Rate Topic: -----

#1 User is offline   49459 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 16-April 14

Posted 30 April 2014 - 11:17 AM

I'm using CJuiDatePicker and I want to know how can i format the date for united states.
0

#2 User is offline   Daniel Galvan 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 83
  • Joined: 04-March 12
  • Location:Mexico

Posted 30 April 2014 - 11:33 AM

View Post49459, on 30 April 2014 - 11:17 AM, said:

I'm using CJuiDatePicker and I want to know how can i format the date for united states.




$this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'model' => $model,
                    'language' => 'es',
                    'attribute' => 'nws_publish_date',
                    'options' => array(
                        'showAnim' => 'fold',
                        'dateFormat' => 'dd-mm-yyyy',
                    ),
            ));


This a good post about your question, it is in spanish but maybe can help you.

cjuidatepicker
If my post was useful, Would you might give a vote +? / Si mi mensaje fue útil, ¿Le podrías dar un voto +?

Thanks / Gracias
0

#3 User is offline   jkofsky 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 534
  • Joined: 17-May 10
  • Location:Pensacola, Florida

Posted 30 April 2014 - 12:34 PM

View PostDaniel Galvan, on 30 April 2014 - 11:33 AM, said:

$this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'model' => $model,
                    'language' => 'es',
                    'attribute' => 'nws_publish_date',
                    'options' => array(
                        'showAnim' => 'fold',
                        'dateFormat' => 'dd-mm-yyyy',
                    ),
            ));


Could it just be setting language to 'en_us'.
Do, or do not. There is no 'try.' Jedi Master Yoda
0

#4 User is offline   49459 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 16-April 14

Posted 30 April 2014 - 02:12 PM

View Postjkofsky, on 30 April 2014 - 12:34 PM, said:

Could it just be setting language to 'en_us'.


I tried, but that code does not exist.
0

#5 User is offline   jkofsky 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 534
  • Joined: 17-May 10
  • Location:Pensacola, Florida

Posted 30 April 2014 - 02:38 PM

View Post49459, on 30 April 2014 - 02:12 PM, said:

I tried, but that code does not exist.

Maybe just 'en', but the previous posting might be better, because of en_us, en_uk, etc.

You could maybe use the CLocale DateTimeFormatter to get the format of the user to put in your 'dateFormat' option.
Do, or do not. There is no 'try.' Jedi Master Yoda
0

#6 User is offline   Ronald van Belzen 

  • Junior Member
  • Pip
  • Yii
  • Group: Members
  • Posts: 64
  • Joined: 04-July 13
  • Location:The Netherlands

Posted 01 May 2014 - 08:59 AM

View Post49459, on 30 April 2014 - 11:17 AM, said:

I'm using CJuiDatePicker and I want to know how can i format the date for united states.

US English is the default setting for jQuery UI Datapicker on which the CJUIDatePicker is based. That means not defining the language property or making it equal to "".
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