public function columnFormat($attribute, $model)
{
if (isset($this->generator->getTableSchema()->columns[$attribute])) {
$column = $this->generator->getTableSchema()->columns[$attribute];
} else {
return;
}
if ($column->type != 'date') {
return;
}
return <<<EOS
[
'attribute'=>'{$attribute}',
'format'=>'date',
'filter' => '<div class="input-group drp-container">'
.DateRangePicker::widget([
'model' => \$searchModel,
'attribute' => '{$attribute}_range',
'presetDropdown'=>true,
'convertFormat'=>true,
'pluginOptions'=>[
'locale'=>['format' => 'Y-m-d'],
'showDropdowns'=>true
]
]).'</div>',
]
EOS;
}