H
H
hollanditkzn2017-03-22 10:44:49
Yii
hollanditkzn, 2017-03-22 10:44:49

Why doesn't filtering work in gridview?

I had a question, somehow filtering worked for me, but that's why it stopped. Filtering works by mask, from the MaskedInput widget. And in GridView I have this code

GridView::widget([
[
                'attribute' => 'minut',
                'format' => ['time', 'php:H:i'],
                'filter' => MaskedInput::widget([
                        'name' => 'minut',
                        'mask' => '99:99',
                    ]),
                'headerOptions' => ['width' => '10']
            ],
 [
                'attribute' => 'phone',
                'filter' => MaskedInput::widget([
                        'name' => 'phone',
                        'mask' => '7(999)999-99-99',
                    ]),
            ],
)]

What happens now is that when the page is driven in, it is updated and such a page is displayed without filtering. In get requests I have this: &minut=17%3A00&phone=7%28333%29333-33-33
How to make it so that it filters normally or it is not possible to apply a mask for filtering?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question