how can i add a search button for filters in gridview?
how can i add a search button for filters in gridview?
What do you mean -
When you type in the filter boxes search happens automatically on leaving the field. Why a button?
yeah it’s automatic
but in my case i’m using DateRangePicker widget and i need to press enter in another field to activate search
[
'attribute' => 'timestamp',
'value' => function ($model/* , $index, $widget */) {
return Yii::$app->formatter->asDate($model->timestamp, 'dd MMMM yyyy HH:mm');
},
//'filterType' => GridView::FILTER_DATE,
'filter' => DateRangePicker::widget([
'model' => $searchModel,
'attribute' => 'datetime_range',
'presetDropdown' => true,
'useWithAddon' => false,
'convertFormat' => true,
'pluginOptions' => [
'timePicker' => false,
//'timePickerIncrement' => 30,
'format' => 'd-m-Y'
]
]),
//'format' => 'html',
],