sezerug / smartgwt

Automatically exported from code.google.com/p/smartgwt
0 stars 0 forks source link

getValue() for TimeItem returns tomorrow's date for a time smaller than 02:00:00 #578

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Looking for the code about Issue 522

What steps will reproduce the problem?
1.Enter 01:59 for time1
2.Enter 02:00 for time2
3.Click "Get Date" button

What is the expected output? What do you see instead?
Expected - Thu Apr 27 01:59:00 CEST 2011 - Wed Apr 27 02:00:00 CEST 2011
Actual   - Thu Apr 28 01:59:00 CEST 2011 - Wed Apr 27 02:00:00 CEST 2011

What version of the product are you using? On what operating system?
Smart GWT 2.4, GWT 2.0.3, Windows 7 Ultimate, Explorer 8

Please provide any additional information below.
This is causing my DateRangeValidator to fail

Original issue reported on code.google.com by alessand...@gmail.com on 27 Apr 2011 at 9:34

Attachments:

GoogleCodeExporter commented 9 years ago
Please do not post issues without a runnable test case.  Thanks.

Original comment by smartgwt...@gmail.com on 27 Apr 2011 at 12:31

GoogleCodeExporter commented 9 years ago
sorry ! I hope That's OK :

    public void onModuleLoad() {  

        Test();

    }   

        private void Test() {
            VLayout vLayout = new VLayout(10);
            final TimeItem time1 = new TimeItem("time1");
            time1.setUseMask(true);
            time1.setDefaultValue("00:00");
            final TimeItem time2 = new TimeItem("time2");
            time2.setUseMask(true);
            time2.setDefaultValue("00:00");
            ButtonItem getTimeButton = new ButtonItem("getTimeButton", "Get Time");
            getTimeButton.addClickHandler(new ClickHandler() {

                @Override
                public void onClick(ClickEvent event) {
                    Date date1 = (Date)time1.getValue();
                    Date date2 = (Date)time2.getValue();
                    SC.say(date1 + " - " + date2);

                }
            });

            DynamicForm timeForm = new DynamicForm();
            timeForm.setFields(time1, time2, getTimeButton);

            vLayout.addMember(timeForm);

            vLayout.draw();

    }

Original comment by alessand...@gmail.com on 27 Apr 2011 at 12:36

GoogleCodeExporter commented 9 years ago
This is now a duplicate of 579.

  http://code.google.com/p/smartgwt/issues/detail?id=579

If a bug is marked Invalid due to lack of a test case, don't file another bug.  
We can reopen it when you add the test case.

However since you've now created yet another bug this one will remain closed.

Original comment by smartgwt...@gmail.com on 27 Apr 2011 at 1:05