Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
  • Nov 30 23:15
    donny26utama opened #755
  • Nov 08 09:49
    manuTro opened #754
  • Oct 20 08:20
    mseele opened #753
  • Oct 20 08:16
    mseele opened #752
  • Oct 20 04:08
    thujone commented #749
  • Oct 20 03:58
    thujone commented #750
  • Sep 12 08:33
    HeadOnDaniel opened #751
  • Sep 05 19:32
    thujone commented #750
  • Sep 05 19:29
    thujone opened #750
  • Sep 02 15:32
    Sector14 closed #697
  • Sep 02 15:32
    Sector14 commented #697
  • Sep 02 13:11
    Sector14 commented #697
  • Sep 02 13:11
    Sector14 commented #697
  • Sep 02 13:09
    Sector14 commented #697
  • Aug 31 07:50

    AlexandreBonneau on next

    Update the readme with the new … (compare)

  • Aug 29 18:09
    LothaireLaeuffer commented #716
  • Aug 26 14:48
    LothaireLaeuffer edited #749
  • Aug 26 14:48
    LothaireLaeuffer edited #749
  • Aug 26 14:45
    LothaireLaeuffer opened #749
  • Aug 26 14:02
    LothaireLaeuffer commented #716
ah indeed
Gabriel Stellini
@AlexandreBonneau is leadingZero:'keep' working?
If I try it out here:
I can enter values with a leading 0
But once I click away, they disappear
is there a way for an input to support both percentages and number values ?
I'm in a case that a user can type a plain value or a percentage, but I can't find a way to support both.
Hi, i just recently use your js library and it's wonderful! Now i'm trying to implement it with input range in a form and i'm currently having trouble with setting the raw value , i already made a question of this topic on SO https://stackoverflow.com/questions/58481789/jquery-using-autonumeric-with-slider-range . If you can take a look that would be awesome :)
Noob question: I have a complex group of forms with prepopulated values. Is there a nice clean way to get the initial values from each form field and add them to AutoNumeric?
@Geekimo unfortunately no; an input only has one set of option at anytime. However you could create a script to update those options on the fly based on your personal conditions
Thom Dunaway

Noob question: I am trying to initialize this for multiple inputs and want the NorthAmerican options. Here is what I have tried.

This works, but no dollar signs

    new AutoNumeric.multiple('input.rate', { modifyValueOnWheel: false });

These do not work

    new AutoNumeric.multiple.northAmerican('input.rate', { modifyValueOnWheel: false });
new AutoNumeric.multiple.northAmerican('input.rate', { modifyValueOnWheel: false }, dollarPos);

Any help is greatly appreciated.


@td234 you can use the following :

new AutoNumeric.multiple('input.rate', ['dollar', { modifyValueOnWheel: false }]);

If you want only positive numbers, try :

new AutoNumeric.multiple('input.rate', ['dollarPos', { modifyValueOnWheel: false }]);
May Weather
I dont want to set minimumValue but I have a range number, and then when I clear input, instead of display min value or previous value, I want to it display empty and onchange event is always fire. How should I do?
Thom Dunaway
@AlexandreBonneau Thank you!!

Hello! I'm trying to use the 'change' event, as I see that Vue AutoNumeric supports it, but it's not working, the event is not called.

<vue-autonumeric v-model="Produto.PrecoFob" v-on:change="atualizarCalculos"></vue-autonumeric>

If I use 'input' event, it is called.

What can I do to make change event work?

@taianrj would you have a codepen to show us the problem?
@namnguyen2091 what is your range? Is 0 included in that range? Do you have a codepen that shows the behavior you are describing?
Hi, I would to union autoNumeric with jQuery, but don't find how. I used autoNumeric 1.9 like $dom.autoNumeric('get'); I would to have something similar in order to not change all whole code of my project (it's big). Do it exist?
I saw jQuery.data(...) in order to union $dom element of jQuery with anElement of autoNumeric, but I think this solution hasn't a good performance.
@oscaroxy check out our guide to migrate from the old unsupported 1.9* to version 4 : https://github.com/autoNumeric/autoNumeric/blob/next/doc/HowToUpgradeToV4.md
I'd say you do not need to 'union' jquery and AutoNumeric (the jquery dependency has been dropped for a simple reason ; jQuery is not much needed anymore with all the major browser supporting more or less the latest html/css/js standards)
please go have a look at the guide, and come back here if you have any further questions
thanks for the reply, but when I apply autoNumerti to $('.currency'), after I have to populate my Model Object, How do I get the value of autoNumeric?
I try this: $('.currency').each(function(){
var myObj.value = AutoNumeric.getAutoNumericElement(this).get();
without change many code from my project... this was the reply of my question. Thanks @AlexandreBonneau, I love AutoNumeric :-)
well, first you would initialize AutoNumeric like this : let an = new AutoNumeric('.currency')
then if you want to get the value of that single field, then you can get the value using all the get* variants, like let myVal = an.getNumericString()
(or getNumber(), or getFormatted() etc.)
do note that, as stated in the migration guide, using new AutoNumeric('selector') will initialize only the very first element it finds with that selector
if you want to initialize multiple DOM elements, then you need to use let anArray = AutoNumeric.multiple('.currency')
then if you want to get all the value of all those elements, you already have all the references to the AutoNumeric objects in anArray, so you could do:
anArray.foreach(an => console.log(an.getNumber()));
it really depends on what you want to do with those values
if you want to submit them, then take a look at the new form* functions :)
I thank you again for the reply, I'll continue to use autoNumeric, now with version 4 :-)
you are welcome @oscaroxy

Hello @AlexandreBonneau , how are you?
I am currently using the plugin in a Blazor solution.
I have configured it so that the digitGroupSeparator is dot "." and the decimalCharacter is comma "," with two decimal places. Example: "1.000,50".
I have a problem when using the binding provided by Blazor, because numbers on the server are dotted as a decimal, like "1000.50".
When the plugin initializes, it works fine allowing me to enter for example "1.000,50", but when having applied this initialization format to the control, Blazor wants to apply a number like "1000.50", the text box remains as "100.050,00".
Do I have a solution for this behavior? I really need it to be displayed with comma decimal separator and I can't use Jquery to set the values because I need to use blazor.

Thank you very much and apologies in advance for my terrible English.

Matías Pablo Bordoy

hi, im using the autonumeric plugin in a .net Blazor App. I have an issue when submitting the form, the plugin SOMETIMES resets the value to the previous value.

If i don't use autonumerics it works well with a normal input.

This only happens when the form is submitted withouth loosing focus.
But it happens like 1 o 20 times.

I tried a lot of fixes no one worked..

@Takumi07 Which options are you using for initializing your AutoNumeric elements?
I never used Blazor myself, so I'm not versed in how it works internally. However from what you are describing, Blazor tries to control the input, which you should not allow. Perhaps do not declare the input as a number input so that Blazor do not touch it?
@MatiasBordoy hey, weirdly I never heard of blazor until now, and you both are asking question about it here :)
Would you have a reproducible test case?
I have a use case that the padding is set to true and the decimalPlaces is set to 2.
When user inputs 12.2, we want it to be formatted to 12.20.
But, it could also allow users to input decimal numbers more than 2. for example: 12.232.
I couldn't find an official way to do so. So, I think I can get user's input and reset the setting decimalPlaces.
However, I can't find a good way to get 12.232 instead of 12.23.
Is there any way that I could get user's raw input?
Or, is there any way I can get user's raw input and decide how the number should be formatted?
Hello, I am using autonumeric.js but I have detected that using an iPad iOS 9.x (it is not possible to update), the plugin does not work and if there are javascript codes they do not run. Does anyone know any solutions?
Hi, I found a bug with auto numeric. If the mouse goes on an input, the input value is clear. I have a site of example
@GregoryPardini Which configuration do you use?
I have a doubt, please help me,thanks
How to achieve this rounding effect in the document, I tried many configurations without success. I also looked at the source code, but I didn't understand it. Can you tell me how to achieve it? It would be great if there is sample code Thank you for your time.