jQWidgets Forums

jQuery UI Widgets Forums Editors NumberInput Max value for jqxNumberInput

This topic contains 6 replies, has 2 voices, and was last updated by  vdo 12 years, 4 months ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • Max value for jqxNumberInput #12893

    vdo
    Participant

    It seems that the max value for the jqxNumberInput is set at 99,999,999.99 by default? I have several cases that I want users to be able to enter a value larger than that. It just seems a bit silly to restrict it to that value. Let me know if i’m missing something or I should use the jqxInput instead and allow user to enter value in string and convert to decimal for storage?

    Max value for jqxNumberInput #12903

    Peter Stoev
    Keymaster

    Hi vdo,

    You can change it to a value which you want by setting the “max” property during the initialization.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Max value for jqxNumberInput #13098

    vdo
    Participant

    How can I input a value of say 1,000,000,000 into the jqxNumberInput as part of the grid cell it seems that the max value it allowed is 99,999,999.

    Setting the max value doesn’t work

    editor.jqxNumberInput({ max: 1000000000, spinButtons: false});

    Max value for jqxNumberInput #13099

    Peter Stoev
    Keymaster

    Hi vdo,

    The below code restricts the numberInput to 1000000000. Entered Values above the maximum value will be set to it i.e to 1000000000.

    $(“#numericInput”).jqxNumberInput({max: 1000000000, digits: 20, width: ‘250px’, height: ’25px’});

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Max value for jqxNumberInput #13103

    vdo
    Participant

    Thanks for your help. Setting the digits property does the trick. The only minor issue I noticed is that when in edit mode it show only 8 digits.

    For example (I use the initeditor for the grid column):

    myGrid[1].initeditor = function(row, cellvalue, editor){
    editor.jqxNumberInput({digits: 20, decimalDigits: 0, spinButtons: false});
    }

    I was able to input a value such as 235,000,000,000. When click on it again to go into edit mode, it shows only 8 digits => 23,500,000. I don’t think it should be chopping off current value like that. Is it a bug or am I missing something? Thanks.

    Max value for jqxNumberInput #13220

    Peter Stoev
    Keymaster

    Hi vdo,

    Setting the “digits” to 20 will enable you to enter 20 digits, but the “max” property is what restricts the input’s max value.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    Max value for jqxNumberInput #13241

    vdo
    Participant

    Hi Peter,

    I get it now. Thx. I have to set both digits and max property otherwise I’ll see the behavior in my previous post.

    myGrid[1].initeditor = function(row, cellvalue, editor){
    editor.jqxNumberInput({digits: 15, max: 999999999999999);
    }

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

You must be logged in to reply to this topic.