jQWidgets Forums

jQuery UI Widgets Forums Editors DateTimeInput Localization?

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 11 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • Localization? #49267

    jon74
    Participant

    Hi all,
    I am facing a strange behaviour when switching to different browser languages:
    Everything is correctly localized (month names, lables etc), except the date pattern.
    It is always shown in format dd/MM/yyyy!
    I am using 2 different languages: Italian and English, so it seems that is always using the italian date pattern.
    The strange thing is that also checking the demo section (http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdatetimeinput/index.htm) I am facing the same problem, so I am pretty sure I am not overriding anything..

    Tested on Win8.1 with both Firefox and Chrome.

    Any ideas?

    Localization? #49270

    Peter Stoev
    Keymaster

    Hi jon74,

    In order to implement Localization for jqxDataTimeInput, please look at: http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxdatetimeinput/localization.htm?arctic

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Localization? #49271

    jon74
    Participant

    Hi Peter, is exactly what I did.. but I get the mentioned wrong behaviour: date pattern is always dd/MM/yyyy even if I change the user language.
    English culture - browser lang It
    English culture – browser lang It
    http://imgur.com/2Zybg0q

    English culture - browser lang En
    English culture – browser lang En
    http://imgur.com/ee74eKQ

    As you can see I see always “10/02/2014” in the textarea, I expect to see 02/10/2014 when I use English culture…
    Everything else works fine (opening the calendar shows correct localized labels for days, month, and the first day of the week changes between Sunday and Monday).

    Localization? #49276

    Peter Stoev
    Keymaster

    Hi jon74,

    The formatString depends only on what is defined in the Localization file which you use. However, if you explicitly set the widget’s formatString property to something like “dd/MM/yyyy”, then that would be the format used by the widget.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.