primefaces: DatePicker: Time is not set to start / end of day when used as range filter
Describe the defect A DatePicker is used as custom filter in a DataTable’s timestamp column. The corresponding entity attribute is from type java.util.Date. When choosing a date range only the entries of the matching end date with a time value of 00:00:00 are included. All other entries of the matching end date with a later time are ignored.
Reproducer
See primefaces-test-master.zip
HINT: Start with profile -Pmojarra23!
Environment:
- PF Version: 11.0.0
- PF Theme: ALL
- JSF + version: Mojarra 2.3
- Affected browsers: ALL
To Reproduce Steps to reproduce the behavior:
- Start reproducer
- Filter column ‘localDate’ by yesterday / yesterday&today / today -> works!
- Reset filter ‘localDate’
- Filter column ‘Date’ by yesterday / yesterday&today / today -> From today only the entry with time value 00:00:00 is inlucded!
- Reset filter ‘Date’
- Filter column ‘localDateTime’ by yesterday / yesterday&today / today -> does not work at all -> why?
Expected behavior All entries with any time value of the selected end date should be included.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 18 (18 by maintainers)
@ltlBeBoy I think you are right that we need to introduce a converter for this. That way we only need to convert once, and not every row. See also #8363
@newk5 we aligned it with PF in the MongoDB model to be consistent
Adding @jepsar as he just reworked the filters to Comparable.