protected $_databaseType = 'datetime';
protected $_columnType = 'datetime';
protected $_columnFormat = 'Y-m-d, H:i';
+ protected $_filterType = 'date_range';
public function _mutator($value)
{
$crud->addClause('where', $name, $value);
} else if ($type === 'select2_multiple') {
$crud->addClause('whereIn', $name, json_decode($value));
+ } else if ($type === 'date_range') {
+ $dates = json_decode($value);
+ $crud->addClause('where', $name, '>=', trim($dates->from));
+ $crud->addClause('where', $name, '<=', trim($dates->to));
}
}