CJuiDatepicker bug (after upgrade to 1.1.6)

I found a bug (I think) in CJuiDatePicker after upgrading framework to newest version.

I have two optional attributes declared as "safe" in model rules:




	public function rules() {

		return array(

			array('date_start, date_end', 'safe'),

		);

	}



I use CJuiDatePicker widget in my view to display field:




$this->widget('zii.widgets.jui.CJuiDatePicker', array(

				'name'=>'date_start',

				'attribute'=>'date_start',

				'model'=>$advertisement,

		));



Before upgrading Yii, everything works fine. But after doing this, values of both fields are not sending properly (NULL).

I think this is a bug… or I miss something.

Try cleaning up your assets dir.

I did it after upgrading framework.

For sure, I did it again, yet a moment ago. That not help.

So is that bug or what?

No replies… should I open a ticket?

There is no such ticket so it will be helpful. Can’t promise to solve it fast though.

Heheh, that’s no bug :)




$this->widget('zii.widgets.jui.CJuiDatePicker', array(

                                'name'=>'date_start',

                                'attribute'=>'date_start',

                                'model'=>$advertisement,

                ));



Code works after deleting ‘name’ param. In previous version of Yii that works (with ‘name’ attribute), in 1.1.6 works only without it. Both date values were sending not as indexes of table (in my case Advertisement[]), but as indexes of $_POST (like name attribute say).

My bad ;) Sorry for confusion.