1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    2
    Vote Rating
    0
    mathias.lin is on a distinguished road

      0  

    Question Why does the default ExtJs time field validation fails with other locale (Chinese)?

    Why does the default ExtJs time field validation fails with other locale (Chinese)?


    I use the zh_CN locale in ExtJs (ExtJs 4.0), the default locale files that ship with ExtJs (no modifications made to it). When I use a timefield in my form, I get a validation error for any value by default. Only if I use the English AM/PM, or if I remove the 上午/下午 manually at the end, it works ok. I would assume ExtJs would be smart enough to handle the different locales correctly. Do I really need to define my own Regex, MaskRe here? Or how to solve this otherwise? Thanks! I'm fairly new to ExtJs.

    The field definition:

    Code:
    {
    xtype: 'timefield',
    name: 'pickupDate',
    fieldLabel: lang["patient.pickup_time"],
    allowBlank: true
    }

  2. #2
    Sencha User subv3rsion's Avatar
    Join Date
    Jul 2011
    Posts
    11
    Vote Rating
    0
    subv3rsion is on a distinguished road

      0  

    Default


    Quote Originally Posted by mathias.lin View Post
    I use the zh_CN locale in ExtJs (ExtJs 4.0), the default locale files that ship with ExtJs (no modifications made to it). When I use a timefield in my form, I get a validation error for any value by default. Only if I use the English AM/PM, or if I remove the 上午/下午 manually at the end, it works ok. I would assume ExtJs would be smart enough to handle the different locales correctly. Do I really need to define my own Regex, MaskRe here? Or how to solve this otherwise? Thanks! I'm fairly new to ExtJs.

    The field definition:

    Code:
    {
    xtype: 'timefield',
    name: 'pickupDate',
    fieldLabel: lang["patient.pickup_time"],
    allowBlank: true
    }
    I am currently having the exact same issue at the moment with our date and time inputs always being invalid. Even worse is Firefox and Chrome are both behaving differently.

    My first approach is to see what is going on with the date prototype and its format in the zh_CN locale of Ext JS 4.0.7 to see if anything is falsey.

  3. #3
    Sencha User subv3rsion's Avatar
    Join Date
    Jul 2011
    Posts
    11
    Vote Rating
    0
    subv3rsion is on a distinguished road

      0  

    Default


    EXTJSIV-5826 Validation of timefield is not correct in Chinese.

  4. #4
    Ext JS Premium Member
    Join Date
    Jan 2011
    Posts
    10
    Vote Rating
    0
    alienintheheights is on a distinguished road

      0  

    Default


    Was this fixed and if so, in which version? I can't see how to view the progress of this bug. I'm running 4.1.0.