Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    May 2009
    Posts
    10
    Vote Rating
    0
    raidan2 is on a distinguished road

      0  

    Default [CLOSED] Bug in com.extjs.gxt.ui.client.util.DateWrapper

    [CLOSED] Bug in com.extjs.gxt.ui.client.util.DateWrapper


    Well, dudes, 12AM is not the actual start of the date (at least not in the USA or GB ).


    Code:
    public DateWrapper resetTime() {
        Date date = asDate();
        // remove millis
        long msec = date.getTime();
        msec = (msec / 1000) * 1000;
        date.setTime(msec);
    
        // reset time to 12am
        date.setHours(12);
        date.setMinutes(0);
        date.setSeconds(0);
        return new DateWrapper(date);
      }
    Must be date.setHours(0);

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    This is not a bug, The method is exactly doing what it should do. You are probably looking for clearTime() or an own method that serves your needs

  3. #3
    Ext GWT Premium Member
    Join Date
    May 2009
    Posts
    10
    Vote Rating
    0
    raidan2 is on a distinguished road

      0  

    Default


    OK. Let's do it the hard way.

    That method called from com.extjs.gxt.ui.client.widget.DatePicker
    Code:
    public void setValue(Date date, boolean supressEvent) {
        this.value = new DateWrapper(date).resetTime();
        if (rendered) {
          update(value);
        }
        if (!supressEvent) {
          DatePickerEvent de = new DatePickerEvent(this);
          de.setDate(date);
          fireEvent(Events.Select, de);
        }
      }
    And that method setValue called every time user clicked on 'day' in DatePicker.
    After changing day I got "19.01.2011 12:00:00". But it must be "19.01.2011 00:00:00"!

  4. #4
    Ext GWT Premium Member
    Join Date
    May 2009
    Posts
    10
    Vote Rating
    0
    raidan2 is on a distinguished road

      0  

    Default And so

    And so


    At least there must be the way to change that behaviour.
    We expects that new day (just day without time) starts from midnight.

    Method setValue firing event with correct date (without 12am starting). But com.extjs.gxt.ui.client.widget.form.DateField ignores that date in event. This class using getValue from DatePicker holding 12am date.

    P.S. Maybe I'm wrong with that expectation. Just another overwritten GXT class to our code

  5. #5
    Sencha User
    Join Date
    Mar 2007
    Posts
    11
    Vote Rating
    0
    kjordan2001 is on a distinguished road

      0  

    Default


    I think the docs should at least be changed. 12:00:00 (what it's reset to) is not 12 am. It's 12 pm (i.e. noon). 12 am is the start of the day (i.e. midnight).

  6. #6
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Quote Originally Posted by kjordan2001 View Post
    I think the docs should at least be changed. 12:00:00 (what it's reset to) is not 12 am. It's 12 pm (i.e. noon). 12 am is the start of the day (i.e. midnight).
    This is fixed in SVN now

Similar Threads

  1. Replies: 2
    Last Post: 27 Sep 2010, 9:25 AM
  2. [CLOSED] Bug in DateWrapper.addMonths
    By tikvar in forum Ext GWT: Bugs (2.x)
    Replies: 1
    Last Post: 29 Mar 2010, 6:08 AM
  3. [FIXED] Bug in class com.extjs.gxt.ui.client.widget.Component
    By raidan2 in forum Ext GWT: Bugs (2.x)
    Replies: 2
    Last Post: 26 Nov 2009, 9:31 AM
  4. using com.extjs.gxt.ui.client.fx.Resizable
    By safisoft13 in forum Ext GWT: Help & Discussion (1.x)
    Replies: 4
    Last Post: 12 Mar 2009, 3:18 PM
  5. Trunk: com.extjs.gxt.ui.client.GXT can't find gray theme
    By jbaxter in forum Ext GWT: Bugs (1.x)
    Replies: 0
    Last Post: 9 Feb 2009, 8:43 AM

Thread Participants: 2

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi