Hi guys,
We are using the MinidDateRangeItem several places in our application, but are having some problems with changing the dates and getting changed events. This can be reproduced in the Showcase as well. Consider the following code:
Steps to reproduce problem:
We are using GWT 2.8.2, SmartGWT LGPL 20190311 on Chrome 72.0.3626 on Mac OS X 10.14.3.
Are we using the MiniDateRangeItem in wrong way?
Best Regards
Rasmus
We are using the MinidDateRangeItem several places in our application, but are having some problems with changing the dates and getting changed events. This can be reproduced in the Showcase as well. Consider the following code:
Code:
public class App implements EntryPoint { private Layout panel; public void onModuleLoad() { MiniDateRangeItem dateItem = new MiniDateRangeItem("dateRangeItem"); dateItem.setWidth("*"); dateItem.addChangedHandler(changedEvent -> { GWT.log("Changed!"); DateRange dr = (DateRange) changedEvent.getValue(); Label l = new Label("Start=" + dr.getStartDate() + " End=" + dr.getEndDate()); l.setWidth100(); l.setHeight(30); l.setWrap(false); panel.addMember(l); }); DynamicForm form = new DynamicForm(); form.setNumCols(3); form.setColWidths(100, 300, "*"); form.setWidth100(); form.setItems(dateItem); panel = new VLayout(); panel.setWidth100(); panel.setHeight100(); panel.setMembers(form); panel.draw(); } }
Steps to reproduce problem:
- Click on the MiniDateRangeItem and set start and end date. Clicking OK fires a changed event.
- Click on the MiniDateRangeItem and set a new end date by clicking the date chooser icon and select a new date.
- End dates changes to newly selected date, but clicking OK does not fire a changed event.
- The shown value in the MiniDateRangeItem is correct
- Click on the MiniDateRangeItem. The value of the end date is now the originally selected date.
- Changing the end date manually and click OK does not fire change event either.
- But value of MiniDateRangeItem shows the correctly selected start and end dates.
We are using GWT 2.8.2, SmartGWT LGPL 20190311 on Chrome 72.0.3626 on Mac OS X 10.14.3.
Are we using the MiniDateRangeItem in wrong way?
Best Regards
Rasmus
Comment