Wj-input-number behavior with decimals

Posted by: pbrophy on 10 December 2020, 1:29 pm EST

  • Posted 10 December 2020, 1:29 pm EST

    In using the wj-input-number control in our application, our business / ux users have complained about how the control behaves with decimals.

    With a format=“c2”, as soon as you start typing it starts to add the 2 decimals and kind of jumps. I understand this is the design of the control, but I am having our product people saying they do not like this behavior.

    So, the question is, can we delay the formatting until a blur method or somehow disable this automatic formatting. We like the formatting options, just not necessarily as the user is typing.

    They are viewing this via the demo here:

    https://www.grapecity.com/wijmo/demos/Input/InputNumber/Formatting/angular

    Mostly focused on the decimal (c2) but really would apply to any of them.

    This is the relevant code in the demo:

    
    <div class="container-fluid">
        <div *ngFor="let fmt of ['n0', 'n2', 'c0', 'c2', 'p0', 'p2']; index as i;" class="form-group">
            <label for="theInputNumberF{{i}}">{{fmt}}:</label>
            <wj-input-number id="theInputNumberF{{i}}" [format]="fmt"></wj-input-number>
        </div>
    </div>
    
    
  • Posted 11 December 2020, 7:15 am EST

    Hi,

    Please refer to the following thread which discusses the same case:

    https://www.grapecity.com/forums/wijmo/wj-input-number-behavior-w_1

    Regards

Need extra support?

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

Learn More

Forum Channels