summaryrefslogtreecommitdiff
path: root/app/Filter/BaseDateRangeFilter.php
diff options
context:
space:
mode:
authorKamil <k.sciana@gmail.com>2018-07-19 21:22:21 +0200
committerFrédéric Guillot <fred@kanboard.net>2018-07-19 12:22:21 -0700
commit03a22132e430adc43845da9a6b5f2dacbeafd311 (patch)
treeed8da48670f0997e0c18c1f191e779d8f2de66aa /app/Filter/BaseDateRangeFilter.php
parentfe935d6ec1e82bea1fd002ea19b6e2f9647ddc70 (diff)
Add search within a range of dates for completion and modification
Diffstat (limited to 'app/Filter/BaseDateRangeFilter.php')
-rw-r--r--app/Filter/BaseDateRangeFilter.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/app/Filter/BaseDateRangeFilter.php b/app/Filter/BaseDateRangeFilter.php
index 336f8c8e..fcff0d4c 100644
--- a/app/Filter/BaseDateRangeFilter.php
+++ b/app/Filter/BaseDateRangeFilter.php
@@ -42,10 +42,10 @@ abstract class BaseDateRangeFilter extends BaseFilter
protected function applyDateFilter($field)
{
$dates = explode('..', $this->value);
-
- if(count($dates)=== 2){
- $timestampFrom = $this->dateParser->getTimestamp($dates[0]);
- $timestampTo = $this->dateParser->getTimestamp($dates[1]);
+
+ if(count($dates)=== 2){
+ $timestampFrom = $this->dateParser->getTimestamp($dates[0]." 00:00");
+ $timestampTo = $this->dateParser->getTimestamp($dates[1]." 00:00");
$this->query->gte($field, $timestampFrom);
$this->query->lte($field, $timestampTo + 86399);