Search code examples
phpjquery-uiyiiyii-extensions

YII CJUIdatepicker Not Working With RenderPartial View


I don't know whether this is question is asked before or not but i stick in this code.

I have used Twitter Bootstrap Modal to show Pop Up.

Now in my pop up window I have included following code (in View)

<?php
         $this->widget('zii.widgets.jui.CJuiDatePicker', array(
        'name'=>'publishDate',
        'options'=>array(
            'showAnim'=>'fold',
        ),
        'htmlOptions'=>array(
            'style'=>'height:20px;'
        ),
    ));

?>

Now the problem is I have called this modal from Controller as

$this->renderPartial('addLaunch', array('model' => $model), false, true);

This date picker is not working Modal but working if I Added in Main layout.


Solution

  • Some times yii widgets does not register its js & css files, still i did not found in which case it happens but it has a solution you should register it's js files externally.

    I have suggested some solution to register js & css files of widgets. Please have a look at this link Include CSS,javascript file in Yii Framework