Hi,
Having a small issue adding the datecontrol widget to a gridview.
EDIT: this is the dateControl wiget from Kartik:
kartik-v/yii2-datecontrol
Here is my code in the index file:
`GridView::widget([
'dataProvider' => $dataProvider,
'filterModel' => $searchModel,
'columns' => [
['class' => 'yii\grid\SerialColumn'],
//'id',
'entryNumber',
'categoryId',
//'accountId',
'description',
'amount',
//'account.description',
//'displayEntryDate',
//'entryDate',
[
'attribute' => 'entryDate',
'value' => 'entryDate',
'filter' => DateControl::widget(DateControl::classname(), ['type'=>DateControl::FORMAT_DATE,])
],
['class' => 'yii\grid\ActionColumn'],
],
]);`
When I run this I get the following error:
PHP Warning – yii\base\ErrorException
Illegal string offset ‘class’