Open RichardDavies opened 7 years ago
i also got strange behaviour when i want to show data with decimal number for example 100000000.0000
then i do $('.number').number(true, 4, ' , ', ' ');
it becomes 1 000 000 000 000,0000
Dealing with the same problem. Has anyone found a solution to this?
I'm having these same issues and its causing me some grief. I'm guessing I just need to dive deep into this plugin and try to fix it.
You need to change the condition after this line: // The whole lot has been selected, or if the field is empty, and the character Instead of this if (start == 0 && end == this.value.length || $this.val() == 0) use this one if (start == 0 && end == this.value.length)
The or condition seems to be the problem
With the as-you-type formatting on an input that allows decimal numbers such as
$('#price').number( true, 2 );
it behaves very oddly when entering numbers less than 1 such as 0.50, 0.25, or 0.01 etc.This weird behavior is easily reproduced using your as-you-type demo with Chrome, Firefox, or IE.