V
V
vnpp2018-10-08 16:56:18
Yii
vnpp, 2018-10-08 16:56:18

How to correctly display a widget inside Pjax, for example, a calendar?

There is a button on the form, when you click on it using pjax, instead of the button, a form is displayed to fill out.
There are many input fields on the form, incl. calendar widget. The widget works fine, but if placed inside pjax it doesn't work.
The form is large and rarely used, so displaying it immediately (or rendering and not displaying until the button is pressed) is not practical.
simple button handler
return $this->renderAjax('big_form');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Timofeev, 2018-10-08
@vnpp

The form is large and rarely used, so displaying it immediately (or rendering and not displaying until the button is pressed) is not practical.

Save 20kb of RAM?
Related :
Try manually initializing js on successful pjax event. Apparently the widget sets the load event, but it does not fire and the script is not initialized.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question