I set my birthday date four times, in four ways. nevertheless the date input widget remains with empty string value. It should be my birthday date. What’s wrong?
<?php
Yii::app()->clientScript->registerScript('baseUrl', "var baseUrl = '" . Yii::app()->baseUrl . "';", CClientScript::POS_HEAD);
Yii::app()->clientScript->registerScript('childCome', <<<EOF
function myload() {
$('#main').load(baseUrl+"/editor/childComeAjax", {date:$('#date').val()});
}
$(function() {
$('#date').datepicker("setDate", '21.07.1980');
$('#date_container').datepicker("setDate", '21.07.1980');
});
EOF
, CClientScript::POS_HEAD);
?>
На дату:
<?php $this->widget('zii.widgets.jui.CJuiDatePicker',array(
'name'=>'date',
'language'=>'ru',
'options'=>array('dateFormat'=>'dd.mm.yy', 'changeMonth'=>true, 'changeYear'=>true,
"setDate"=>'21.07.1980'),
'htmlOptions'=>array('value'=>'21.07.1980', 'onchange'=>'')));
?>
<div id="main"></div>