diff --git a/modules/qi-core/src/main/java/org/jpos/qi/components/DateRangeComponent.java b/modules/qi-core/src/main/java/org/jpos/qi/components/DateRangeComponent.java index 00896c9f28..61749c3d8c 100644 --- a/modules/qi-core/src/main/java/org/jpos/qi/components/DateRangeComponent.java +++ b/modules/qi-core/src/main/java/org/jpos/qi/components/DateRangeComponent.java @@ -24,6 +24,8 @@ import com.vaadin.ui.themes.ValoTheme; import org.jpos.qi.QI; +import java.time.LocalDateTime; +import java.time.LocalTime; import java.time.ZoneId; import java.util.Date; @@ -77,7 +79,8 @@ public DateRange getValue() { dr.setStart(startDate); } if (datePickerTo.getValue() != null) { - Date endDate = Date.from(datePickerTo.getValue().plusDays(1).atStartOfDay(ZoneId.systemDefault()).toInstant()); + LocalDateTime endOfDay = LocalDateTime.of(datePickerTo.getValue(), LocalTime.MAX); + Date endDate = Date.from(endOfDay.atZone(ZoneId.systemDefault()).toInstant()); dr.setEnd(endDate); } } else {