Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 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
  • Aug 20 10:10
    AlexandreBonneau commented #739
  • Aug 20 10:10

    AlexandreBonneau on next

    Add CTRL+Y shortcut for redo (#… (compare)

  • Aug 20 10:10
    AlexandreBonneau closed #738
  • Aug 20 10:10
    AlexandreBonneau closed #739
  • Aug 20 09:45
    neunato synchronize #739
  • Aug 16 05:25
    wilmveel commented #747
oscaroxy
@oscaroxy
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 :-)
Alexandre
@AlexandreBonneau
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')
Alexandre
@AlexandreBonneau
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 :)
oscaroxy
@oscaroxy
I thank you again for the reply, I'll continue to use autoNumeric, now with version 4 :-)
Alexandre
@AlexandreBonneau
you are welcome @oscaroxy
Takumi07
@Takumi07

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
@MatiasBordoy

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..

Alexandre
@AlexandreBonneau
@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?
Guobacai
@Guobacai
Hello,
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?
Guobacai
@Guobacai
Or, is there any way I can get user's raw input and decide how the number should be formatted?
chusmsanchez
@chusmsanchez
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?
GregoryPardini
@GregoryPardini
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
Alexandre
@AlexandreBonneau
@GregoryPardini Which configuration do you use?
耗砸
@haoza
hello
I have a doubt, please help me,thanks
http://autonumeric.org/guide#decimalPlaces
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.
Sincerely,
@AlexandreBonneau
Alexandre
@AlexandreBonneau
@haoza hey
What are you trying to achieve exactly?
耗砸
@haoza
Rounding of decimal places
Alexandre
@AlexandreBonneau
耗砸
@haoza
Like this example
Alexandre
@AlexandreBonneau
when you select the decimal places you want, you'll be able to test it at the top of the page, and then the configuration to achieve that result will be displayed as well
耗砸
@haoza
I tried, but it didn't work
Alexandre
@AlexandreBonneau
What are you trying to achieve exactly?
please link to a codepen so when can help you
耗砸
@haoza
I just want the last decimal place to be automatically rounded
耗砸
@haoza
image.png
How to configure similar screenshot effects
This is what i want
thanks
@AlexandreBonneau
Alexandre
@AlexandreBonneau
@haoza could you please create a codepen with what you tried already?
耗砸
@haoza
I have edited
耗砸
@haoza
@AlexandreBonneau I edited
Alexandre
@AlexandreBonneau
do you have the link?
(when you hit 'save', it should have created a new url for you)
耗砸
@haoza
@AlexandreBonneau