[CLOSED] Default date format for Type="Date" RecordField

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] Default date format for Type="Date" RecordField

    I updated to latest version of Ext.Net on one of the projects after a long time today (around 7-8 months).
    Immediately I noticed RecordField with Type="Date" no longer parse dates sent from server (in universal serializable format).

    I believe the default DateFormat for Ext.Net Date RecordField used to be the same, has the same changed in recent past?
    Last edited by Daniil; May 28, 2012 at 5:45 PM. Reason: [CLOSED]
  2. #2
    Please clarify, did you update from SVN or use last official release?
  3. #3
    I updated from SVN (the latest commit for 1.x branch), and I can confirm, if I set the DateFormat to this:
    Y-m-dTh:i:s
    things return back to normal.
  4. #4
    In 1.3 default date format is "yyyy-MM-ddThh:mm:ss.u" (ms is added)
  5. #5
    Hmmm.. I better create a RecordField derived class and reset again for myself to old one.
    Thanks for the quick replied vlad...
  6. #6
    The related note about Ext.NET v2.

    There is the RenderMilliseconds property of ModelField (ModelField is the substitution of RecordField).

    By default, it's false and, respectively, milliseconds are not rendered.

    Setting RenderMilliseconds to true causes milliseconds to be rendered.
  7. #7
    Great, thanks for the update. It would have been useful to back-port it to v1.
  8. #8
    Thanks for the suggestion. We will consider it.
  9. #9
    Personally I feel this change (adding milliseconds) in v1.3 was a mistake, and should be treated as a defect. Maybe we should fix v1.4? That of course would lead to another breaking change.

    We could add .RenderMilliseconds [bool] in v1.4 to provide API consistency between v1.4 and v2.x.

    In the vast majority of cases Millisecond precision is not required. The DateTime Class was not really even designed for sub-second precision.

    Any thoughts on reverting back to just "yyyy-MM-ddTHH:mm:ss" format, thereby removing the Milliseconds from being serialized by default?
    Geoffrey McGill
    Founder
  10. #10
    I should also note, in v2, the current default functionality is to NOT include Milliseconds. So if upgrading from v1.3 to v2.x you might run into a breaking change anyways.

    Certainly my preference is to remove Millisecond rendering from the default functionality of v1.4... and, add .RenderMilliseconds [boolean] property to v1.4. The functionality of v2.x would then not change and upgrading from the latest 1.x build to 2.x wouldn't involve a Breaking Change, at least as far as this property/functionality is concerned.
    Geoffrey McGill
    Founder
Page 1 of 2 12 LastLast

Similar Threads

  1. Date Field causes "Uncaught RangeError"?
    By Bubu in forum 2.x Help
    Replies: 1
    Last Post: Aug 01, 2012, 5:17 AM
  2. Replies: 4
    Last Post: May 22, 2012, 10:40 AM
  3. Replies: 7
    Last Post: Dec 13, 2011, 2:39 PM
  4. Replies: 0
    Last Post: Nov 07, 2011, 6:53 PM
  5. [CLOSED] Column/Store field name "Date" and crash of ExtJS
    By pil0t in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 28, 2010, 9:18 PM

Posting Permissions