How Do I Force Yii To Use A Specific Jquery Version

[font=Arial,][size=4]i had an issue when trying to incorporate multiple date picker which can be found here :http://multidatespickr.sourceforge.net/[/size][/font]

[font=Arial,][size=4]The issue i had is explained in the following stackoverflow. :http://stackoverflow.com/questions/17920743/jquery-multiple-datepicker-selected-dates-not-loading-to-textbox[/size][/font]

[font=Arial,][size=4]Since i dint receive any responds yet i started digging in to code and figured out that yii’s auto generating jquery is the issue to all the problem…[/size][/font]

[font=Arial,][size=4]so what i did is removed the following jqeury… jquery.min.js and included this. jquery-1.7.2.js[/size][/font]

[font=Arial,][size=4]now on console it gives me this eror “NetworkError: 404 Not Found - css/assets/819742eb/jquery.min.js” but however i am able to get the multiple date picker worked which is my real need. :)[/size][/font]

[font=Arial,][size=4]now what i need is, since i just manually deleted and got this working but i wanted to know how to force a view file (index.php) in yii framework to load only the scripts that are defined in the page but not anything from main template or defined anywhere else.[/size][/font]

[font=Arial,][size=4]below is a html output and i only need the ones that are ponited in blue to be loaded inside a specific view.[/size][/font]

[font=Arial,][size=4]

[/size][/font]

[font=Arial,][size=4]

[/size][/font]

in /layouts/main.php, i used jquery-1.8.3




$themeBaseUrl = Yii::app()->theme->baseUrl;

/** @var CClientScript $cs */

$cs = Yii::app()->clientScript;

$cs->scriptMap['jquery.js'] = $themeBaseUrl.'/js/vendor/jquery-1.8.3.min.js';

$cs->scriptMap['jquery.min.js'] = $themeBaseUrl.'/js/vendor/jquery-1.8.3.min.js';

This thread will also be helpful. :)

http://www.yiiframework.com/forum/index.php/topic/9070-use-own-jquery-script-files-instead-of-yiis/

Hi All, tnx for the replies…

I did it this way…

in the controller…




   protected function beforeRender($view) {

      if ($this->action->id === 'getCallDates') {

         Yii::app()->clientScript->scriptMap = array(

             '*.js' => false,

         );

      }

      return parent::beforeRender($view);

   }