I
I
IdFox2018-02-20 09:36:26
Yii
IdFox, 2018-02-20 09:36:26

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

1 answer(s)
M
Maxim Fedorov, 2018-02-20
@qonand

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 question

Ask a Question

731 491 924 answers to any question