CJuiDatePicker:
<?php $this->widget(‘zii.widgets.jui.CJuiDatePicker’, array(
'name'=>'TaskPtReEvaluation[medical_diagnosis_date]',
'model'=>$model,
// additional javascript options for the date picker plugin
'options'=>array(
'showAnim'=>'fold',
'dateFormat'=>'mm-dd-yy',
'changeMonth' => 'true',
'changeYear' => 'true',
'yearRange'=>'1900:2020',
),
'htmlOptions'=>array(
'width'=>'25%',
'class'=>'txtfld'
),
));
?>
CJuiTimePicker:
<?php $this->widget(‘application.extensions.jui_timepicker.JTimePicker’, array(
'model'=>$model,
'attribute'=>'start_time',
'name'=>'ClassTimings[start_time]',
'options'=>array(
'showPeriod'=>true,
'showPeriodLabels'=> true,
'showCloseButton'=> true,
'closeButtonText'=> 'Done',
'showNowButton'=> true,
'nowButtonText'=> 'Now',
'showDeselectButton'=> true,
'deselectButtonText'=> 'Deselect'
),
)); ?>
Both widgets are used in same page and doesn’t work because of some jquery issue.
This is my .js includes in main layout:
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery.js"></script>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/jquery-ui-1.7.3.custom.min.js"></script>
<!–Ajax Chat Script–>
<!–<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/ajaxim/js/im.load.js?php"></script>
–>
<script type="text/javascript" src="<?php echo Yii::app()->request->baseUrl; ?>/js/ui.selectmenu.js"></script>