question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

input type="number" will cause error on numeric field with thousand separator

See original GitHub issue

THE JS

$('.fund-input').each(function (index, field) {
  var dc = $(this).data('decimal');
  dc = typeof dc !== 'undefined' ? dc : 5;

    new Cleave(field, {
      numeral: true,
      numeralThousandsGroupStyle: 'thousand',
      numeralDecimalScale: dc
  });
);

THE HTML <input class="form-control fund-input empty" autocomplete="off" placeholder="0.00" name="amount" type="number" value="">

image @nosir

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
pimskiecommented, Jan 15, 2019

[…]The library should simply support appropriate options.

<input type="number"> simply doesn’t support input other than valid floating-point numbers.

4reactions
natedunncommented, Jul 27, 2018

It isn’t a semantic option to use tel in any case other than phone numbers. The library should simply support appropriate options.

Read more comments on GitHub >

github_iconTop Results From Across the Web

HTML Input type number Thousand separator - Stack Overflow
Now in 2022, I used it to format thousands separator for large numbers in input text form. It is great, specially with its...
Read more >
Browser support for <input type="number"> with different ...
An <input type="number"> element will open a numeric software keyboard on modern mobile operating systems. Not every user can input decimal ...
Read more >
<input type="number"> - HTML: HyperText Markup Language
<input> elements of type number are used to let the user enter a number. They include built-in validation to reject non-numerical entries.
Read more >
Excel: convert text to number with formula and other ways
The tutorial shows how to change text to number by using Excel's Convert to Number error checking option, formulas, mathematic operations, ...
Read more >
Prevent using invalid group/decimal separator when entering ...
The suggested solution is to prevent the value from being accepted when it contains a group separator, indicating that it is not a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found