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

Datepicker no Working with Pjax. #9

Closed
tecnologiaterabyte opened this issue Apr 2, 2015 · 6 comments
Closed

Datepicker no Working with Pjax. #9

tecnologiaterabyte opened this issue Apr 2, 2015 · 6 comments

Comments

@tecnologiaterabyte
Copy link

When you first open the gridview works fine, the datepricker open, once the gridview with pjax the datepicker stops no working, the script is not registered properly, any way to fix it.

Image Datepicker Working:

jui-datepicker-working

Image Datepicker No Working after filtering:

jui-datepicker-no-working

@tecnologiaterabyte tecnologiaterabyte changed the title No Working with Pjax. Datepicker no Working with Pjax. Apr 2, 2015
@smichae
Copy link

smichae commented Apr 16, 2015

Same with SliderInput (and most likely every widget in this package). One possible solution is a change to registerClientOptions in Widget.php. This has only been through a small amount of testing, just putting it here as a thought starter.

$js = "$(document).on('ready pjax:success', function() { jQuery('#$id').$name($options); });";
$this->getView()->registerJs($js, \yii\web\View::POS_END);

@szewciu
Copy link

szewciu commented May 26, 2015

@smichae could you please give us full code of registerClientOptions method including your solution?

@smichae
Copy link

smichae commented May 27, 2015

@szewciu Those two lines in the Apr 15 comment is the solution that's worked for me so far with my setup - just a replacement of current lines 78 & 79.

@tecnologiaterabyte
Copy link
Author

@smichae You can prepare a pr to solve this problem and close the issue,

Thks,

Wilmer.

@kasoft
Copy link

kasoft commented Jan 22, 2016

I have the same Problem with the Autocomplete Widget. I'm not using Pjax but loading the Page (and the Autocomplete Widget) with Ajax. I tried to put the complete Widget in an extra File and include it with renderAjax - but with no success. It only works the first time you load the complete page.

@klimov-paul
Copy link
Member

Closed, since has PJAX support is dropped.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants