2

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.

Santosh Ram Kunjir
  • 1,074
  • 1
  • 12
  • 23
Rajiv Pingale
  • 995
  • 9
  • 27
  • are we supposed to guess what heppens if you add in `Modal` i.e it does not show it does not saves values what? – Afnan Bashir Jul 25 '12 at 13:18
  • If I were to guess, this is probably due to the jQuery not getting not getting registered when loaded via renderPartial . . . you may need to load it with the page and just hide/unhide it. – ernie Jul 25 '12 at 17:58
  • Actually, I am loading content in Bootstrap's Pop-up via Ajax's $.load() function. that means pop-up has dynamic content and which is loaded by calling "Render Partial" method. If I tried to include same code to main layout page. It is working but it is not working when I use same code in pop-up.I guess the main problem with RenderPartial call. Please help me out. – Rajiv Pingale Jul 26 '12 at 06:04
  • Did you find out the solution? – ekussberg Feb 21 '13 at 14:52
  • Yes, following answer worked for me, one which I marked as accepted. – Rajiv Pingale Feb 22 '13 at 11:38

2 Answers2

1

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

Community
  • 1
  • 1
Onkar Janwa
  • 3,892
  • 3
  • 31
  • 47
0

Version 1.1.16 has a problem that if you use the same update DOM ID that gets repeatedly updated if you click another ajax link, it'll stop working. It works the first time but then it'll stop. Going back to version 1.1.15 works flawlessly.