jQWidgets Forums

jQuery UI Widgets Forums General Discussions Editors NumberInput Bug when reading input value

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

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Bug when reading input value #72981

    efreguglia
    Participant

    If I set the decimalSeparator to something different than ‘.’ and I have more than 2 decimal digits, working with simple input mode, when I try to read the input value I get only the first 2 decimals.
    See the example code:

    $(“#jqxNumberInput”).jqxNumberInput({
    height: 20,
    width: 80,
    theme: ‘energyblue’,
    inputMode: ‘simple’,
    decimalDigits: 4,
    digits: 4,
    decimalSeparator: ‘,’
    });
    $(‘#jqxNumberInput’).val(1.2345);
    alert($(‘#jqxNumberInput’).val());

    The response is 1.23 instead of 1.2345
    If I change back the decimalSeparator property or the inputMode property everything works fine.

    Bug when reading input value #72984

    efreguglia
    Participant

    Sorry, I found out that the number of digits was wrong; if I set the digits property to 18 (for example), the widget work properly.

    Bug when reading input value #73062

    Peter Stoev
    Keymaster

    Hi efreguglia,

    Glad you solved your issue. However, keep in mind that if your decimalSeparator is “,” then you should set values with “,” too.

    Regards,
    Peter

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

You must be logged in to reply to this topic.