Announcement

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

    Date issues

    Found a bug in RestDataSource when JSON is used: transformRequest does not call serializeFields, thus logical date and logical time fields are sent as a full GMT date. In my case, after saving a date the day decreased by one - it was sent as "2010-07-15T21:00:00".

    Also, how to add a leading zero for default date formatters? I would like to use standard ISO format "YYYY-MM-DD HH:MM" (or without time) and toJapanShortDateTime does this except for the leading zero. Date._toShortDate should add Number._lzero, but setting it manually at the beginning does not work and I do not want to write my own function:
    Code:
    Date.prototype.setDefaultDateSeparator("-");
    Date.setShortDatetimeDisplayFormat("toJapanShortDateTime");
    Date.setShortDisplayFormat("toJapanShortDate");
    Date.setInputFormat("YMD");
    Number._lzero = "0";
    Since Number._1zero is defined in Number.js, I assume that there is spelling mistake.

    Thanks.
    Last edited by marpetr; 16 Jul 2010, 05:25.

    #2
    Hi Marpetr...
    Thanks for the detailed report - both of these are actual issues, and we've just fixed them in mainline.
    Fixes should show up in nightly builds etc from now on

    Specifically: the RestDataSource server-inbound data format when doing a postMessage, with json data format will serialize logical dates correctly (no times), and the JapanShortDateTime will correctly include leading zeros on the day/month values rather than ommiting them (and yes - Number._lzero was undefined and a mistake in our code, now rectified)

    Regards

    Isomorphic Software

    Comment


      #3
      Thank you! Now there is an error when there is no data or oldValues... It is in first line of serializeFields.
      Also when canExpandRecords:true ListGrid records are expanded, the title partly hides under the component. Using latest nightly, Chrome 6.0.466.0 dev, applies to all skins.
      Last edited by marpetr; 21 Jul 2010, 01:08.

      Comment


        #4
        We're not seeing this. Can you create a test case demonstrating the issue? Starting from a RestDataSource sample it should be easy.

        Comment


          #5
          Open RestDataSource example source, replace the four URL lines with:
          Code:
          dataFormat: "json",
          operationBindings: [
              { operationType: "fetch", dataProtocol: "postMessage" }
          ]
          Click Try It, you'll get error _2 is undefined. The problem is that neither dsRequest.data nor dsRequest.oldValues exist in the initial autoFetchData request, thus first line of serializeFields fails (only the first argument is passed).

          The expansion problem occurs only in 07-15 nightly - sorry.

          Thanks.

          Comment


            #6
            So what about a fix for this?

            Comment


              #7
              Fixing! Check out the next nightly and let us know if you still have problems.

              Comment


                #8
                Now DataSource with dataFormat:"json" does not work at all :)

                http://localhost:8080/isomorphic/system/reference/SmartClient_Explorer.html#simpleJSON

                The error is: INFO:RPCManager:sendQueue called with no current queue, ignoring

                Comment


                  #9
                  Fixed as well, sorry, that was an unrelated regression due to recently implemented offline features.

                  Comment


                    #10
                    Thanks, now working perfectly.

                    There is a slight issue that data cannot be filtered by null value. null values are useful in database foreign keys, e.g. in a tree structure parent value of null represents a root node. However, listGrid.fetchData({ field: null }) will not work, the criterion will be stripped out. Also, why does SC send null instead of empty string for empty text fields?

                    And now DatePicker always decreases day by one.
                    Last edited by marpetr; 28 Jul 2010, 04:04.

                    Comment


                      #11
                      And now DatePicker always decreases day by one
                      We're not seeing this behavior but we have made some changes in the date-item / date-picker area to deal with timezones and daylight-savings time recently.
                      Can you provide details to reproduce the issue? Specifically:

                      - which example are you seeing this on - and what exactly are you seeing (the date displayed in a date-item differs from what you picked or something else?)
                      - which browser / OS are you using?
                      - what locale (timezone) is your machine in?
                      - what specific date are you selecting from the picker that's causing this?

                      Comment


                        #12
                        My timezone is GMT+2+DST, so GMT+3 now. Open /isomorphic/system/reference/SmartClient_Explorer.html#dateItem example, change item type to datetime and try choosing a date using picker. The day should decrease if DST is in effect.
                        There is no specific date - all dates are causing this.

                        And also another bug in Calendar: open databound calendar demo, add
                        Code:
                        eventChanged: function(event) { isc.say(event.startDate+"<br>"+event.endDate); }
                        to calendar properties. Now drag an event such that it would end at 12AM (midnight). The dates should be correct. But now click on the event, click Edit Details and Save Event. Now the day increases by one and difference between start and end becomes >24h!

                        Windows 7, Chrome 6.0.472.0 dev, SmartClient 2010-07-28

                        Comment


                          #13
                          "datetime" field selection / off by one error is now fixed. This'll show up in the next nightly.
                          We'll keep you posted on the calendar bug.
                          BTW this thread is starting to get rather long and covers various separate though related issues. It might make sense in future to start new threads if you see further issues in separate components etc so we can easily track what has been resolved and what's still outstanding

                          Thanks
                          Isomorphic Software

                          Comment


                            #14
                            The calendar issue is now also resolved
                            Thanks
                            Isomorphic Software

                            Comment

                            Working...
                            X