Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CDN jquery-ui.min.js not loadded in bootstrap modal or renderAjax #12742

Closed
hirenbhut93 opened this issue Oct 14, 2016 · 1 comment
Closed

CDN jquery-ui.min.js not loadded in bootstrap modal or renderAjax #12742

hirenbhut93 opened this issue Oct 14, 2016 · 1 comment
Labels

Comments

@hirenbhut93
Copy link
Contributor

What steps will reproduce the problem?

I used CDN api for jquery-ui.min.js & jquery-ui.min.css like

'bundles' => [
    'yii\jui\JuiAsset' => [
        'css' => [
            YII_ENV_DEV ? 'themes/smoothness/jquery-ui.css' : '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.min.css',
        ],
        'js' => [
            YII_ENV_DEV ? 'jquery-ui.js' : '//ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js',
        ],
    ],
],

I have used yii\jui\DatePicker in my bootstrap modal like.

<?= $form->field($user, 'dob')->widget(DatePicker::className(), [
    'clientOptions' => [
        'changeMonth' => true,
        'changeYear' => true,
    ],
    'options' => [
        'class' => 'form-control',
        'readOnly' => true,
    ],
]) ?>

I use renderAjax in my controller action.

However display error message TypeError: jQuery(...).datepicker is not a function.

When i disabled/remove CDN of JuiAsset work perfectly.

I have many try to resolved this issue but not find any solution.

Why?

Additional info

Q A
Yii version 2.0.9
PHP version 5.6
Operating system UBUNTU
@yii-bot
Copy link

yii-bot commented Oct 14, 2016

Issue moved to yiisoft/yii2-jui#50

@yii-bot yii-bot closed this as completed Oct 14, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants