I have 2 grids to display information based on year in the same view and the following code for the editable column,
[
'attribute' => 'date_completed',
'format' => ['date', 'php:d/m/Y'],
'class' => 'kartik\grid\EditableColumn',
'editableOptions' => function($model, $key, $index) use ($year) {
return [
'inputType' => Editable::INPUT_WIDGET,
'widgetClass' => 'kartik\datecontrol\DateControl',
'options' => [
'type' => kartik\datecontrol\DateControl::FORMAT_DATE,
'displayFormat' => 'php:d/m/Y',
],
];
},
],
The fields for the 2nd grid does not work due to id or form name clashes. I can’t find examples to give the control a unique name. Any ideas?