Results 1 to 3 of 3

Thread: NumberField and Currencies in Switzerland problem

    You found a bug! We've classified it as EXTGWT-4953 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha Premium Member
    Join Date
    Aug 2015
    Posts
    2

    Default NumberField and Currencies in Switzerland problem

    Hello,

    In Switzerland, a currency number looks like "CHF 10'000.00". The apostrophe is used as the grouping separator.

    I think NumberField gets confused with the apostrophe because it shows "CHF 10", and all the digits to the right of the grouping character don't appear.

    As a workaround, I'm using a custom currency format, which is the same as the default currency format but without grouping separator:

    Code:
    // The default currency format for this locale (de_CH) is "\u00A4\u00A0#,##0.00;\u00A4-#,##0.00"
    // private static NumberFormat systemCurrencyFormat = NumberFormat.getCurrencyFormat(SystemInfo.getCurrencyCode()).;
    
    private static NumberFormat systemCurrencyFormat = NumberFormat.getFormat("\u00A4\u00A0#0.00;\u00A4-#0.00", SystemInfo.getCurrencyCode());
    And with this, the NumberField shows "CHF 10000.00", not perfect but better than "CHF 10".

    By the way, I'm using GXT 4.0.1

    Thank you very much in advance

  2. #2
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,178

    Default

    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha Sr Product Manager
    Join Date
    Jan 2012
    Location
    Arlington, WA
    Posts
    1,178

    Default

    Did you need some help getting around the issue?

Similar Threads

  1. NumberField problem
    By zdarsky in forum Ext GWT: Discussion
    Replies: 1
    Last Post: 24 Jul 2009, 6:42 AM
  2. 1.1 NumberField Problem
    By jongohr in forum Sencha Ext JS Q&A
    Replies: 16
    Last Post: 8 Sep 2007, 8:04 AM

Posting Permissions

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