Results 1 to 5 of 5

Thread: DatePicker Localization

  1. #1
    Sencha User
    Join Date
    Apr 2014
    Posts
    21
    Answers
    2

    Default Answered: DatePicker Localization

    The DatePicker is using the first letter to represent days of a week, saw it in Date.js:

    getDayInitial: function(value){ return value.substr(0,1); }

    It works in most languages but not in Chinese. In Chinese it should use the last character. Is it a known issue? Any recommended work around?

    forum.PNG

  2. In your example. the dayNames returned are already the simplified day names:

    Ext.Date.dayNames=["?","?","?","?","?","?","?"];

    But in my application it returns me the full day names:

    Ext.Date.dayNames=["???","???","???","???","???","???","???"];

    Then Date.js substring to get the first character which I think it's a bug.

    My workaround is override the getDayInitial function, return a dayShortNames if it exists, else call parent.

  3. #2
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    Hi echowang,

    Take a look at this example, while I haven't tested this with your example it should be a good start to get you going.

    http://dev.sencha.com/deploy/ext-4.0...&charset=utf-8


    Regards,
    Bryan

  4. #3
    Sencha User
    Join Date
    Apr 2014
    Posts
    21
    Answers
    2

    Default

    Hi Bryan, thanks for the demo! The day of the week are correct in your demo.
    What Ext version did you use? I am using 4.2.

  5. #4
    Sencha - Support Team bjdurham85's Avatar
    Join Date
    Mar 2014
    Posts
    962
    Answers
    55

    Default

    I believe 4.0 but shouldn't have changed much for localization. Here is the 4.2 link:

    http://docs.sencha.com/extjs/4.2.4/e...ulti-lang.html


    Regards,
    Bryan

  6. #5
    Sencha User
    Join Date
    Apr 2014
    Posts
    21
    Answers
    2

    Default

    In your example. the dayNames returned are already the simplified day names:

    Ext.Date.dayNames=["?","?","?","?","?","?","?"];

    But in my application it returns me the full day names:

    Ext.Date.dayNames=["???","???","???","???","???","???","???"];

    Then Date.js substring to get the first character which I think it's a bug.

    My workaround is override the getDayInitial function, return a dayShortNames if it exists, else call parent.

Similar Threads

  1. [FIXED] DatePicker Localization
    By rhonen in forum Sencha GXT Bugs
    Replies: 4
    Last Post: 28 Feb 2014, 1:33 AM
  2. Localization issue in datepicker control
    By sa.saurabh in forum Ext:Bugs
    Replies: 3
    Last Post: 5 May 2013, 11:12 PM
  3. Datepicker localization
    By cscagliola in forum Ext 3.x: Help & Discussion
    Replies: 9
    Last Post: 5 Nov 2009, 6:25 PM

Tags for this Thread

Posting Permissions

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