Announcement

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

    MiniDateRangeItem's Tomorrow and Yesterday do not always function as expected

    SmartGWT version: SC_SNAPSHOT-2011-08-02/Pro Deployment (built 2011-08-02) - latest 2.5 pro

    Browsers: any

    Given a ListGrid with a Date column in which user can select a date range as filter:
    Code:
    ListGridField entryDate = new ListGridField("entryDate", "Entry date");
    entryDate.setFilterEditorType(new MiniDateRangeItem());
    entryDate.setType(ListGridFieldType.DATE);
    When the user selects Yesterday or Tomorrow as relative dates, the picker shows bogus values.

    Examples:
    If the user selects
    FROM: Tomorrow --> 19.03.2013 (should be 20.03.2013)
    TO: Yesterday --> 19.03.2013 (should be 18.03.2013)

    However, if the user selects
    FROM: Yesterday --> 18.03.2013
    TO: Tomorrow --> 20.03.2013
    .. the days are correct.

    FROM: Tomorrow --> 19.03.2013 (should be 20.03)
    TO: 29.03.2013 --> 29.03.2013

    Code:
                    "criteria":[
                        {
                            "fieldName":"entryDate", // tomorrow
                            "operator":"greaterOrEqual", 
                            "value":"2013-03-19T22:00:00"
                        }, 
                        {
                            "fieldName":"entryDate", // yesteday
                            "operator":"lessOrEqual", 
                            "value":"2013-03-18T21:59:59"
                        }
                    ]
    We do have this kind of configuration on module load:
    Code:
    DateUtil.setDefaultDisplayTimezone("+02:00");
    DateUtil.setAdjustForDST(true);
    Does this cause what we're seeing in the filters?
    Is it working as intended? Should we not use the default display timezone at all?
    Attached Files

    #2
    Do you have anything on this?

    Comment


      #3
      It doesn't appear to be able to be reproduced in 3.1p in the Showcase.

      Comment

      Working...
      X