mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX: Make WithinRangeFilter work with dates and related columns.
This commit is contained in:
parent
6bb1218760
commit
7036abbd75
@ -26,8 +26,9 @@ class WithinRangeFilter extends SearchFilter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function apply(DataQuery $query) {
|
function apply(DataQuery $query) {
|
||||||
|
$this->model = $query->applyRelation($this->relation);
|
||||||
$query->where(sprintf(
|
$query->where(sprintf(
|
||||||
"%s >= %s AND %s <= %s",
|
"%s >= '%s' AND %s <= '%s'",
|
||||||
$this->getDbName(),
|
$this->getDbName(),
|
||||||
Convert::raw2sql($this->min),
|
Convert::raw2sql($this->min),
|
||||||
$this->getDbName(),
|
$this->getDbName(),
|
||||||
|
Loading…
Reference in New Issue
Block a user