Skip to content

Commit

Permalink
Merge pull request #29 from symbiote-library/fix-date-range
Browse files Browse the repository at this point in the history
Fix null field in date-range query
  • Loading branch information
Joshua Carter authored Dec 3, 2018
2 parents fd19c04 + d8c714c commit 2f32b92
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/model/ListFilterDateRange.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ public function applyFilter(SS_List $list, array $data) {
* @return SS_List
*/
public function applyDateRange(SS_List $list, $start, $end) {
// get both date fields, or a single field
$startDateField = $this->StartDateField;
$endDateField = $this->EndDateField;
$endDateField = $this->EndDateField ?: $startDateField;

// Use DateField to convert from the date format to 'yyyy-mm-dd' for
// database use.
Expand Down

0 comments on commit 2f32b92

Please sign in to comment.