add option to datatable
This commit is contained in:
@@ -13,11 +13,17 @@ class FilterBetween extends SearchFilter
|
|||||||
[$minVal, $maxVal] = $this->filter->getValue();
|
[$minVal, $maxVal] = $this->filter->getValue();
|
||||||
|
|
||||||
if ($minVal) {
|
if ($minVal) {
|
||||||
|
if ($this->filter->getDatatype() == "date") {
|
||||||
|
$minVal = $minVal . " 00:00:00";
|
||||||
|
}
|
||||||
$this->filter->setValue($minVal);
|
$this->filter->setValue($minVal);
|
||||||
$query = (new FilterGreaterThanOrEqual($this->query, $this->filter))->apply();
|
$query = (new FilterGreaterThanOrEqual($this->query, $this->filter))->apply();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($maxVal) {
|
if ($maxVal) {
|
||||||
|
if ($this->filter->getDatatype() == "date") {
|
||||||
|
$maxVal = $maxVal . " 23:59:59";
|
||||||
|
}
|
||||||
$this->filter->setValue($maxVal);
|
$this->filter->setValue($maxVal);
|
||||||
$query = (new FilterLessThanOrEqual($this->query, $this->filter))->apply();
|
$query = (new FilterLessThanOrEqual($this->query, $this->filter))->apply();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user