Answer the question
In order to leave comments, you need to log in
How to disable form submit in GridView in YII2 when input changes?
Hello everyone
We have YII2, a regular GridView
We have filters in the header of the table
How to disable submit (pjax) forms when the value in a certain input changes I.e. the
essence is this, I make my own filter (date range)
In the filter parameter of the cell I set two input fields
Everything is displayed as needed
But when the input changes (the first date is selected), the data is sent, because the event is set (by default)
jQuery('#w0').yiiGridView({"filterUrl":"\/number\/","filterSelector": "#w0-filters input, #w0-filters select"});
That is, on a change in any input or select, data is sent.
Here's how to disable this event on the given input ?
Thanks for the hints
Answer the question
In order to leave comments, you need to log in
Well, disable you submit, and how will the request for filtering be sent when choosing a date range. Don't reinvent the wheel with date range selection through pickers, take a ready-made DateRangePicker and use it
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question