Codxplore.com

Latest news:

New android application Islamic Video has been released. its a free islamic video application for android smartphone. Download now!

jQuery ui date picker in Yii


We can use this piece of code for jQuery ui date picker in php Yii framework.

                $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                    'model' => $model,
                    'attribute' => 'PRD_START_DT',
                    'options' => array(
                        'dateFormat' => 'd-M-y',
                        'showAnim' => 'slide',
                        'changeMonth' => true,
                        'changeYear' => true,
                        'minDate' => date('d-M-y'),
                    ),
                    'htmlOptions' => array(
                        'class' => 'form-control',
                    ),
                ));
                ?>

here,

model = is your model class

attribute = model attribute / table column name

option = contains date picker formate, animation type etc

htmlOptions = contains the id , class etc

 

thanks

 

Tags :

Views : 683

Subscribe Us


Follow Us