Results 1 to 8 of 8

Thread: [CLOSED][3.0rc2] Need to be able to have strict date parsing in DateField

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext JS Premium Member
    Join Date
    Feb 2009
    Location
    London, UK
    Posts
    31

    Default [CLOSED][3.0rc2] Need to be able to have strict date parsing in DateField

    Lack of strict date parsing with the DateField is biting us in 2.2.1, and we get the unwanted date "rollover" behaviour.

    I see that Date.parseDate() in 3.0 RC2 has a "strict" arg to prevent this, which is great.

    However, a read of the 3.0 RC2 DateField source code shows that it always calls parseDate() without this arg, so the default strict=false will be applied.

    So I log this as a bug, but I apologize if there's another way of getting strict parsing in DateField that I didn't spot.

    Thanks.

  2. #2

    Default

    This was already discussed here:
    http://www.extjs.com/forum/showthread.php?t=71514

  3. #3
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    Personally I think it would make more sense to have a flag on the Date object to indicate whether to use strict parsing or not. I would assume the likelihood is that you'll want to stick with the one kind throughout an application.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  4. #4
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236

    Default

    i proposed a strict config for both the DateField and TimeField, along with a slew of bugfixes to resolve existing DST issues (in both the 2.x & 3.x branches), in the following threads:
    https://www.sencha.com/forum/showthread.php?p=302310
    https://www.sencha.com/forum/showthread.php?p=309913

    in the 2 proposed fixes above, i intentionally made strict a config (which defaults to true since most ppl expect dates / times in DateFields/TimeFields not to rollover) at the DateField/TimeField-level to avoid breaking existing Date.parseDate() behaviour.

    Additionally, most users only ever deal with Dates when fiddling with these 2 Components, so i thought it'd make more sense to have strict as a config there --- it's also easily overridden via Ext.override() --- and maintain strict as a simple 3rd argument in the Date.parseDate() method.

    thoughts?
    Last edited by mystix; 24 Jun 2009 at 7:57 PM. Reason: edit - updated links

  5. #5
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996

    Default

    If those are active bugs (either of them a DUP?) IMHO they should be moved to the 3.x forum where they'll garner more attention and a patch can be applied backwards as appropriate.

  6. #6
    Sencha User mystix's Avatar
    Join Date
    Mar 2007
    Location
    Singapore
    Posts
    6,236

    Default

    Quote Originally Posted by mjlecomte View Post
    If those are active bugs (either of them a DUP?) IMHO they should be moved to the 3.x forum where they'll garner more attention and a patch can be applied backwards as appropriate.
    done. also updated the two links i referred to above to point to the redirected threads.

  7. #7
    Ext JS Premium Member
    Join Date
    Feb 2009
    Location
    London, UK
    Posts
    31

    Thumbs up

    Quote Originally Posted by evant View Post
    Personally I think it would make more sense to have a flag on the Date object to indicate whether to use strict parsing or not. I would assume the likelihood is that you'll want to stick with the one kind throughout an application.
    100% agreed. In our app we'd set that flag on each page, and leave it that way. Can't think of a possible scenario when sometimes we'd want rollover and sometimes not.

  8. #8
    Sencha Premium User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,256

    Default

    I've spoken with Marc about this and we came up with a compromise to suit both. Stay tuned.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •