Anyone has an Idea for the basic installation of datepicker in form fields?
thanks
Anyone has an Idea for the basic installation of datepicker in form fields?
thanks
Hi phphopzter,
You can use CJuiDatePicker.
Please see this wiki: http://www.yiiframework.com/wiki/438/jquery-ui-datepicker
<div class="row">
<?php echo $form->labelEx($model,'my_date'); ?>
<?php
$this->widget('zii.widgets.jui.CJuiDatePicker', array(
'model' => $model,
'attribute' => 'my_date',
'htmlOptions' => array(
'size' => '10', // textField size
'maxlength' => '10', // textField maxlength
),
'options' => array(
'dateFormat' => 'dd-mm-yy',
'changeMonth'=>true,
'changeYear'=>true,
'yearRange'=>'1950:2000',
),
));
?>
<?php echo $form->error($model,'my_date'); ?>
</div>
<?php /*
It’s from my form. Hope it helps