Input number. Digits after comma

Posted by: sicrum on 3 January 2019, 3:15 am EST

    • Post Options:
    • Link

    Posted 3 January 2019, 3:15 am EST

    Is there any way to format number this way:

    • having thousand spearators
    • having 0-4 digits after comma

    Examples:

    7598347.24342 → 7,598,347.2434

    2344.3 → 2,344.3

    100 → 100

    Tried N4 but it gives fixed number of digits after comma:

    2344.3 → 2,344.3000

    100 → 100.0000

    Looks like “#,##0.00” is not supported

  • Posted 4 January 2019, 1:34 am EST

    Hi,

    InputNumber support .NET-style Standard Numeric Format Strings.

    So for the stated requirement, you may set the format to ‘g4’.

    More on format property: https://demos.wijmo.com/5/Angular/WijmoHelp/WijmoHelp/topic/wijmo.input.InputNumber.Class.html#format

    More on .NET Standard numeric format strings: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings

    ~Sharad

  • Posted 4 January 2019, 6:46 am EST

    “g4” does not show thousand delimiters.

    I need this:

    7598347.24342 → 7,598,347.2434

    “g4” gives this:

    7598347.24342 → 7598347.2434

  • Posted 7 January 2019, 2:50 am EST

    Hi,

    We are sorry, the Standard Numeric Format Strings do not support such format which does not append 0 after the (.) with comma as separator.

    Hence, this is not supported with Wijmo InputNumber.

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels