Skip to content

Commit dcd7d31

Browse files
committed
[Bug] Round system.datetime grid filter to whole day
`DateTimeFilter::apply` passed `roundToDay=false` to the trait, which makes GDI's `DateFilter` collapse `gte` and `lte` to the same instant for `on` queries — never matching a stored datetime with a non-zero time component. The filter UI is date-only, so whole-day match is the right semantic. `DateFilter` (for `system.date`) already passes `true`; this aligns `DateTimeFilter`.
1 parent 94630f5 commit dcd7d31

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/DataIndex/Filter/DateTimeFilter.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ public function apply(mixed $parameters, QueryInterface $query): QueryInterface
3232
return $query;
3333
}
3434

35+
// Date-only filter UI — match whole days, not exact instants.
3536
foreach ($parameters->getColumnFilterByType(ColumnType::SYSTEM_DATETIME->value) as $column) {
36-
$query = $this->applySystemDatetimeFilter($column, $query, false);
37+
$query = $this->applySystemDatetimeFilter($column, $query, true);
3738
}
3839

3940
return $query;

0 commit comments

Comments
 (0)