add this in your form..............
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'id'=>'ID-starting_date', // consider usinge CHtml::activeId
'model'=>'', // Use model here
'attribute'=>'starting_date',
'name'=>'UserOrder[starting_date]', // the modelName[attributeName]
'language'=>'da', // choose language, this one is Danish
'htmlOptions' => array(
'size' => '10', // textField size
'maxlength' => '10', // textField maxlength
),
'options' => array(
'showOn' => 'both', // also opens with a button
'dateFormat' => 'yy-mm-dd', // format of "2012-12-25"
'showOtherMonths' => true, // show dates in other months
'selectOtherMonths' => true, // can select dates in other months
'changeYear' => true, // can change year
'changeMonth' => true, // can change month
'yearRange' => '2013:2023', // range of year
'minDate' => '2013-01-01', // minimum date
'maxDate' => '2099-12-31', // maximum date
'showButtonPanel' => true, // show button panel
),
));
Ingen kommentarer:
Send en kommentar