jQWidgets Forums
jQuery UI Widgets › Forums › Editors › NumberInput › Max value for jqxNumberInput
Tagged: jqxnumberinput, Number Input
This topic contains 6 replies, has 2 voices, and was last updated by vdo 12 years, 4 months ago.
-
Author
-
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?
Hi vdo,
You can change it to a value which you want by setting the “max” property during the initialization.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHow 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});
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 StoevjQWidgets Team
http://www.jqwidgets.comThanks 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.
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 StoevjQWidgets Team
http://www.jqwidgets.comHi 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);
} -
AuthorPosts
You must be logged in to reply to this topic.