Answer the question
In order to leave comments, you need to log in
How to move filters from gridview to a separate form?
There is a gridview, it has filters. One of the filters by date, you need to make this filter as a period, that is - "from - to", since the column is narrow in width, then as a decision to put this filter in front of the grid itself. The question is, how then to hang the submit event on enter, + so that it is like in one form?
'filterModel' => $searchModel,
'columns' => [
[
'attribute' => 'created_at',
'value' => function(Visitors $model) {
return $model->getCreated();
},
'filter' => DateTimePicker::widget([
'name' => 'VisitorsSearch[created_at]',
'options' => ['placeholder' => Yii::t('app', 'SELECT_HINT')],
'convertFormat' => false,
'type' => DateTimePicker::TYPE_INPUT,
'value' => $searchModel->created_at,
'pluginOptions' => [
'format' => 'yyyy-mm-dd hh:ii:ss',
'todayHighlight' => true
]
]),
],
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question