Hi!
Hello! I try using editable with datetimepicker widget. I store the datetime as UnixTimestamp in the DB. The problem is that the date/time is not getting converted into the human understandable format. Here’s the code I use. Where is the mistake?
[
'class' => 'kartik\grid\EditableColumn',
'attribute' => 'date_time_game',
'editableOptions' => [
'inputType' => \kartik\editable\Editable::INPUT_DATETIME,
'name' => 'date_time_game',
'options' => [
'convertFormat' => true,
'pluginOptions' => [
'autoclose' => true,
'todayHighlight' => true,
'minuteStep' => 15,
'format' => 'dd.mm.yy hh:ii',
],
'type' => DateTimePicker::TYPE_COMPONENT_APPEND,
'size' => 'md',
'value' => function($model) {
return date('d.m.y H:i', $model->date_time_game);
},
]
],
],