Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DateItem getValue Problem

    Hello,

    I have some problem with the DateItem Component.

    The following code show a DateItem display and a button to show the selected date.

    When I select (or type) a date before 1940, the SC say one day (1 hour?) before.

    - 12/25/1912 => Tue Dec 24 23:00:00 CET 1912
    - 1/1/1939 => Sat Dec 31 23:00:00 CET 1938

    After 1940 no problems :
    - 12/25/1983 => Sun Dec 25 00:00:00 CET 1983
    - 1/1/2010 => Fri Jan 01 00:00:00 CET 2010

    And finally the strange case of 1890 without problems:
    - 1/1/1890 => Wed Jan 01 00:00:00 CET 1890
    - 12/25/1890 => Thu Dec 25 00:00:00 CET 1890


    Here is my simple onModuleLoad to test :
    Code:
        public void onModuleLoad() {
    
            final DateItem myDate = new DateItem();
            myDate.setUseTextField(true);
    
            ButtonItem aff = new ButtonItem();
            aff.setTitle("Show Date");
    
            aff.addClickHandler(new ClickHandler() {
                public void onClick(ClickEvent event) {
                    SC.say("Date String :"+ (Date) myDate.getValue());
                }
            });
    
            DynamicForm df = new DynamicForm();
            df.setFields(myDate, aff);
            df.draw();
        }
    Leap years problem ?

    Pierre
    Last edited by Psidoler; 15 Apr 2010, 12:13. Reason: bad title

    #2
    anyone test ?

    Comment


      #3
      same problem

      Latest version of SmartGWT (2.3.1358) & GWT (2.0.4) installed.
      Last edited by innews; 24 Aug 2010, 03:01.

      Comment


        #4
        We're not reproducing this problem
        Can you let us know- what platform you're seeing this on (OS, browser) and what the locale (timezone) on your system is.

        Thanks
        Edit/Delete Message

        Comment


          #5
          Browser: FF 3.6.8 & Chrome 5.0.375.127
          Timezone: UTC+03:00 Moscow (with Daylight saving time)
          OS: Windows Server 2008R2 x64 Rus

          Comment


            #6
            Can you try the latest nightly build from here http://www.smartclient.com/builds and see if you continue to see the problem?

            Comment


              #7
              Checked nightly build 2010-08-24. Bug not fixed.

              Incorrect date returned when in DateItem field entered DST date.
              Last edited by innews; 24 Aug 2010, 15:34.

              Comment


                #8
                Hi All,
                We are looking into this issue.
                One question: Does this bug occur for you with compiled code or just in development mode?
                In other words - if you run "GWT Compile", then access the URL (without the gwt.codesvr=... parameter), do you still see the dates being incorrect?

                Thanks

                Comment


                  #9
                  A quick update on this.
                  This appears to be a core GWT bug. We're reporting it to Google and looking at workarounds.
                  - Attaching a test case demonstrating this problem in a standalone GWT entry point class.
                  Attached Files

                  Comment

                  Working...
                  X