0
我在我的yii應用程序中使用CJuiDateTimePicker,但無法將數據保存到mysql中。如何才能將數據保存到MySQLYII :: CJuiDateTimePicker沒有保存數據到MySQL
代碼::
<?php Yii::import('application.extensions.CJuiDateTimePicker.CJuiDateTimePicker');
$this->widget('CJuiDateTimePicker',array(
'model'=>$model, //Model object
'attribute'=>'pp_date', //attribute name
'language'=> '',
'mode'=>'date',
'options'=>array(
'showAnim'=>'fold',
'changeMonth' => 'true',
'changeYear' => 'true',
'showOtherMonths' => 'true',
'selectOtherMonths' => 'true',
'showOn' => 'both',
),
));?>
任何幫助讚賞
您能向我們展示您的模型的驗證規則嗎? –
我得到了解決方案。這不取決於規則。只需要選項中的日期格式 - >'dateFormat'=>'yy-mm-dd', –