Cjuidatepicker En-Us

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

Could it just be setting language to ‘en_us’.

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.

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 "".