Announcement

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

    ListGrid filter date choser and DefaultDisplayTimeZone expected behavior?

    My application has the default time zone as "+0:00".
    Code:
    DateUtil.setDefaultDisplayTimezone("+0:00");
    On server ListGrids, I have the filterEditor being displayed, example:
    Code:
    mainGrid.setShowFilterEditor(true);
    The DataSource on the ListGrid is set to use AdvancedCriteria.
    Code:
    final DataSource ds = DataSource.get(ALARM_DATASOURCE_NAME);
    ds.setWillHandleAdvancedCriteria(true);
    On a datetime field, I'm using the DateRange editor to chose the from date as Yesterday. The DSRequest is coming with a time being set:

    Code:
    {
        "dataSource":"DETAILED_ALARM_V", 
        "operationType":"fetch", 
        "operationId":"OperationsAlarms", 
        "componentId":"isc_MainListGrid_4", 
        "data":{
            "operator":"and", 
            "criteria":[
                {
                    "operator":"and", 
                    "criteria":[
                        {
                            "fieldName":"error_date", 
                            "operator":"greaterOrEqual", 
                            "value":"2011-06-26T07:00:00"
                        }
                    ]
                }
            ]
        }, 
        "startRow":0, 
        "endRow":75, 
        "textMatchStyle":"substring", 
        "resultSet":[ResultSet ID:isc_ResultSet_5 (created by: isc_MainListGrid_4)], 
        "callback":{
            "caller":[ResultSet ID:isc_ResultSet_5 (created by: isc_MainListGrid_4)], 
            "methodName":"fetchRemoteDataReply"
        }, 
        "willHandleError":true, 
        "showPrompt":false, 
        "prompt":"Finding Records that match your criteria...", 
        "oldValues":{
            "operator":"and", 
            "criteria":[
                {
                    "operator":"and", 
                    "criteria":[
                        {
                            "fieldName":"error_date", 
                            "operator":"greaterOrEqual", 
                            "value":"2011-06-26T07:00:00"
                        }
                    ]
                }
            ]
        }, 
        "clientContext":{
            "requestIndex":2
        }, 
        "requestId":"DETAILED_ALARM_V$62716"
    }
    I expected the value to be either "2011-06-26T00:00:00" or "2011-06-26".

    This is with SC_SNAPSHOT-2011-06-13/PowerEdition.

    #2
    Declare the field as "date" rather than "datetime" and you'll get the latter value ("2011-06-26"). "date" tells SmartGWT to treat the value as a logical date with the time component ignored.

    Comment


      #3
      If I declare it as a date, then I won't see the time in the ListGrid records. The date and the time are important to the display.
      Last edited by dczech; 27 Jun 2011, 10:58.

      Comment


        #4
        Hi David,
        Ok - we've made some changes today to address this issue. We believe we are now handling datetime type fields in the DateRange type items (used in filter editors) properly.
        Please give it a try with the next nightly build (June 28 or greater) and let us know if you continue to see problems

        Thanks
        Isomorphic Software

        Comment

        Working...
        X