I use the same code as in ActiveForm, but it does not work:
What am I doing right to add jui datepicker to the filter field for gridview?
<?= GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
'list_id',
[
'attribute' => 'channel',
'value' => 'channel.title',
],
[
'attribute' => 'list_date',
'value' => 'list_date',
'filter' => \yii\jui\DatePicker::widget(\yii\jui\DatePicker::className(), ['language' => 'ru', 'dateFormat' => 'dd-MM-yyyy']),
],
'make_date',
['class' => 'yii\grid\ActionColumn'],
],
]); ?>
source
share