Permalink
Browse files

BUGFIX: Make WithinRangeFilter work with dates and related columns.

  • Loading branch information...
1 parent 6bb1218 commit 7036abbd755ef836c8e4d09b7fd80f0fffd01450 @sminnee sminnee committed May 18, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 search/filters/WithinRangeFilter.php
@@ -26,8 +26,9 @@ function setMax($max) {
}
function apply(DataQuery $query) {
+ $this->model = $query->applyRelation($this->relation);
$query->where(sprintf(
- "%s >= %s AND %s <= %s",
+ "%s >= '%s' AND %s <= '%s'",
$this->getDbName(),
Convert::raw2sql($this->min),
$this->getDbName(),

0 comments on commit 7036abb

Please sign in to comment.