Hello, I'm using:
Isomorphic SmartClient/SmartGWT Framework (v8.3p_2012-11-23/PowerEdition Deployment 2012-11-23)
I am using a DateRangeItem where time of day is of importance.
Here is the little form I created:
If I choose Today in both fields, it shows today's date, with 00:00 in the start date, and 23:59 in the enddate date picker (so far so good).
However, if I call getEndDate() the time in the returned Date object is 00:00:00, so If the date would be 2012/12/31 23:59 (which is displayed correctly in the picker), a call to getEndDate() would give me 2012/12/31 00:00.
Is this a bug? I am using the EUROPEAN date format, if that makes a difference.
Isomorphic SmartClient/SmartGWT Framework (v8.3p_2012-11-23/PowerEdition Deployment 2012-11-23)
I am using a DateRangeItem where time of day is of importance.
Here is the little form I created:
Code:
public class DateSelectionForm extends DynamicForm { DateRangeItem dateRangeItem = new DateRangeItem("orderDate", "Datumbereik"); public DateSelectionForm(){ init(); } public void init(){ initDateRangeItem(); setFields(dateRangeItem); } private void initDateRangeItem() { setDataSource(DataSource.get("Order_")); dateRangeItem.setAllowRelativeDates(true); DateRange dateRange = new DateRange(); dateRange.setRelativeStartDate(RelativeDate.TODAY); dateRange.setRelativeEndDate(RelativeDate.END_OF_TODAY); dateRangeItem.setValue(dateRange); } public DateRangeItem getDateRangeItem(){ return dateRangeItem; } public Date getStartDate(){ DateRange range = dateRangeItem.getValue(); return range.getStartDate(); } public Date getEndDate(){ DateRange range = dateRangeItem.getValue(); return range.getEndDate(); } }
If I choose Today in both fields, it shows today's date, with 00:00 in the start date, and 23:59 in the enddate date picker (so far so good).
However, if I call getEndDate() the time in the returned Date object is 00:00:00, so If the date would be 2012/12/31 23:59 (which is displayed correctly in the picker), a call to getEndDate() would give me 2012/12/31 00:00.
Is this a bug? I am using the EUROPEAN date format, if that makes a difference.
Comment