php - Issue using CJuiDatePicker with different formats -


i using cjuidatepicker in form , need use 2 different formats: mm/dd/yy shown , dd/mm/yy sent in $_post.

$questionario->widget('zii.widgets.jui.cjuidatepicker', array(     'model' => $modelodoquestionario,     'attribute' => 'data_preenchimento',     'language' => 'en',     'options' => array(         'showanim' => 'fold',         'showbuttonpanel' => true,         'showon' => 'both',         'dateformat' => 'dd/mm/yy',         'altfield' => '#questionarios_data_preenchimento',         'altformat' => 'mm/dd/yy',      ),     'htmloptions' => array(         'style' => 'height:14px;'     ), )); 

this field in html:

<input style="height:14px;" id="questionarios_data_preenchimento" name="questionarios[data_preenchimento]" type="text" /> 

but still mm/dd/yy format in $_post... can wrong?

you can put in configuration file: 'main.php' this:

'widgetfactory' => array(     'widgets' => array(         'cjuidatepicker' => array(             'scriptfile' => 'jquery-ui.min.js',             'language' => 'en',             'options' => array(                 'dateformat' => 'dd/mm/yy',                 'showanim' => 'fold',                 'fontsize' => '0.85em',             ),         ),     ), ), 

with ever call 'cjuidatepicker' widget inherit format.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -