Announcement

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

    Simple date filter in ListGrid

    Hi

    I use ListGrid with a simple filter editor. One of columns in my grid is a date type column. When I set the same day as the start date and the end date for the range in filter editor, I get empty grid (even so I have records with this date in my data source). You can check it in SmartGWT Showcase - http://www.smartclient.com/smartgwt/showcase/#grid_daterange_filtering - example with MiniDateRangeItem. I suppose this filter for date range uses expression: date greater than .... and less than ..., instead of greater or equal and less or equal.
    Is it correct behaviour for this filter? In my opinion not. I think the start and end date from the range should be included to results of filtering data. Such works for example SQL between operator.
    It would be great if this filter may work like SQL between operator. Is it possible to change it in near future in smartgwt library ?

    Thanks in advance

    Regards

    Marcin

    #2
    This was fixed in the codebase a while ago - take a look at a nighly build

    Comment


      #3
      Could you check it again? I have tested it with the latest build (r1319) and still not working

      Comment


        #4
        Take a look at the RPC tab in the developer console to figure out what criteria are being passed and post them here

        Comment


          #5
          I think the operator is wrong...

          Code:
          {
              "actionURL":"ds/country.data.xml", 
              "showPrompt":true, 
              "prompt":"Finding Records that match your criteria...", 
              "transport":"xmlHttpRequest", 
              "useSimpleHttp":true, 
              "promptStyle":"dialog", 
              "params":{
                  "operator":"and", 
                  "criteria":[
                      {
                          "fieldName":"dateCreated", 
                          "operator":"greaterThan", 
                          "value":"2000-11-30"
                      }, 
                      {
                          "fieldName":"dateCreated", 
                          "operator":"lessThan", 
                          "value":"2000-11-30"
                      }
                  ]
              }, 
              "httpMethod":"GET", 
              "sendNoQueue":true, 
              "bypassCache":true, 
              "callback":{
                  "target":null, 
                  "methodName":"$37c"
              }, 
              "willHandleError":true, 
              "serverOutputAsString":true, 
              "clientContext":{
                  "requestIndex":2
              }, 
              "data":null
          }

          Comment


            #6
            gorfin86,
            The code in SVN was a little behind and I've committed the latest right now. Probably easier for you to pick up the latest nightly builds from http://www.smartclient.com/builds/ instead of building from SVN.

            Sanjiv

            Comment


              #7
              Could you post here a revision number, where this fix was made? I check the latest (http://www.smartclient.com/builds/smartgwt/2010-07-28/) build, but unfortunately it is still not working.

              I found only javadoc changes in MiniDateRangeItem and DateRangeItem (r1324)

              I would like to apply only this fix to the tagged SmartGWT 2.2 version, I don't want to use latest nightly build.

              Comment


                #8
                If you're building from SVN, male sure you update the "tools" directory as well or else you will not be picking up the latest changes. The latest code changes (actually for a couple of weeks now) no longer uses greaterThan or lessThan, but instead uses greaterOrEqual, lessOrEqual.

                Comment


                  #9
                  Ok, with the latest build from SVN (trunk and tools) is working now. Thank You

                  Comment

                  Working...
                  X