diff --git a/Editor/ColumnSearch.php b/Editor/ColumnSearch.php new file mode 100644 index 0000000..e999125 --- /dev/null +++ b/Editor/ColumnSearch.php @@ -0,0 +1,45 @@ +where($field->dbField(), $searchTerm); + } + + return true; + } else if ($colSearch['type'] === 'dateRange') { + if ($searchTerm) { + $parts = explode('|', $searchTerm); + + if ($parts[0]) { + $query->where($field->dbField(), $parts[0], '>='); + } + + if ($parts[1]) { + $query->where($field->dbField(), $parts[1], '<='); + } + } + + return true; + } + + // Text fields can get the default handling + return false; + } +}