yiisoft/yii — Issue #456: CJUIDate Picker Name
Author: wiseloren
Created: 2012-03-06 03:12:40+00:00
State: open

r3539 for http://code.google.com/p/yii/issues/detail?id=1799 seems to have broken the ability to specify the field name using the name attribute, and instead forces using the name attribute inside of HTMLOptions. It would probably be best to only have this option in one place, but for backwards compatibility, I guess it has to stay in both.

$this->widget(
'zii.widgets.jui.CJuiDatePicker',
array(
'model'=>$model,
'attribute'=> 'frDateDate',
'name'=>'Menu[frDate][date]',
'id'=>'Menu_Date',
'htmlOptions'=>array(
'style'=>'height:15px;width:100px;'
)
)
);

should result in the field being named Menu[frDate][date] based on the name attribute from CJUIInputWidget (http://www.yiiframework.com/doc/api/1.1/CJuiInputWidget#name-detail) but it does not.