IDEMPIERE-5753 - Date Picker doesn't set time on first date in Quick Mode (#1873)

This commit is contained in:
Peter Takács 2023-06-07 00:39:07 +02:00 committed by GitHub
parent 34aa34d55f
commit 4b445e3107
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -474,13 +474,13 @@ public class DateRangePicker extends Popup implements EventListener<Event>, Valu
if(selectedQuickListItem != null) {
String unit = (String) selectedQuickListItem.getAttribute("TimeUnit");
int offset = (int) selectedQuickListItem.getAttribute("Offset");
Date dateFrom = (Date) selectedQuickListItem.getAttribute("DateFrom");
dates = getInterval(unit, unit, offset, false, false, dateFrom);
Date dateFromAttr = (Date) selectedQuickListItem.getAttribute("DateFrom");
dates = getInterval(unit, unit, offset, false, false, dateFromAttr);
this.dateFrom = new Timestamp(dates[0].getTime());
this.dateTo = new Timestamp(dates[1].getTime());
dates = setTimesOnDates(dateFrom, dateTo);
dateFrom = dates[0];
dateTo = dates[1];
dates = setTimesOnDates(this.dateFrom, this.dateTo);
this.dateFrom = dates[0];
this.dateTo = dates[1];
returnVal = DisplayType.getDateFormat().format(this.dateFrom) + " - " + DisplayType.getDateFormat().format(this.dateTo);
}
break;