Input number and custom decimal separator

Posted by: fbernet on 15 March 2018, 2:09 am EST

    • Post Options:
    • Link

    Posted 15 March 2018, 2:09 am EST

    Hi,

    is it possible to specify a custom format in angular 2 inputNumber control?

    For example, if in French culture how to accept . as a separator instead of , or even better to accept both , and . as separators?

  • Posted 15 March 2018, 9:33 pm EST

    Hi,

    You can set custom format separators by accessing wijmo.culture object.

    Refer to following code snippet for angular2:-

    //import wijmo core module
    
    import * as wjcCore from "wijmo/wijmo";
    
    
    //change separators
    
    wjcCore.culture.Globalize.numberFormat[',']=".";
    //change decimal separators
    
    wjcCore.culture.Globalize.numberFormat['.']="_";
    
  • Posted 5 April 2018, 11:01 pm EST

    Hi,

    thanks for the answer.

    So I guess there’s no way to define , and . at the same time as the decimal separator?

  • Posted 8 April 2018, 6:40 pm EST

    Yes your understanding is correct, only one symbol is acceptable as a decimal separator.

  • Posted 9 April 2018, 1:41 am EST

    OK, thanks for the answer

Need extra support?

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

Learn More

Forum Channels