Results 1 to 4 of 4

Thread: [SOLVED] localize TimeField to German

  1. #1

    Default [SOLVED] localize TimeField to German

    Hello,

    I search the forum and the learning section but could not find any information how to localize the TimeField for German usage. The time in the dropdown is always shown with AM and PM and I need to change to German view.

    Can anyone help me with this?

    Greetings
    Lars

  2. #2
    Sencha User Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246

    Default

    Use (and translate):

    Code:
    if(Ext.form.TimeField){
       Ext.apply(Ext.form.TimeField.prototype, {
          minText : "The time in this field must be equal to or after {0}",
          maxText : "The time in this field must be equal to or before {0}",
          invalidText : "{0} is not a valid time",
          format : "g:i A"
       });
    }

  3. #3
    Sencha Premium User
    Join Date
    Apr 2007
    Location
    Vienna, Austria
    Posts
    59

    Default

    Hi -

    I am not sure I understand what you mean by "german view" but did you try to add something like this

    Code:
    format: 'G:i',
    to the config options of the time field?

  4. #4

    Thumbs up

    Thanks to both of you!

    That did the trick:

    HTML Code:
    format: 'G:i'
    The german format is displayed correctly.
    Attached Images Attached Images

Posting Permissions

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