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.

No support for input types other than text

See original GitHub issue

Cleave works very well with <input type="text">, but does not work with <input type="number"> and possibly other input types. For example, using following formatter with type="number" only allows the user to type 3 digits. After typing the third one, everything is removed.

var cleave = new Cleave('.input-element', {
    numeral: true,  
    numeralThousandsGroupStyle: 'thousand'  
});

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

5reactions
nosircommented, Mar 25, 2017

Oh, so if this is only you need, you can set it to <input type="tel">, this should trigger number keyboard on mobile also works well with cleave.js.

4reactions
graham-saunderscommented, Aug 7, 2018

Seeing support for number and other HTML 5 input types would be great

Read more comments on GitHub >

github_iconTop Results From Across the Web

<input type="text"> - HTML: HyperText Markup Language | MDN
Any values in the list that are not compatible with the type are not included in the suggested options. The values provided are...
Read more >
"input type" | Can I use... Support tables for HTML5, CSS3, etc
Intended to look like the underlying platform's native search field widget (if there is one). Other than its appearance, it's the same as...
Read more >
Form Inputs: The Browser Support Issue You Didn't Know You ...
I created Input Type Sandbox, a utility for trying out different combinations of types, patterns and attributes, for exactly this purpose. Not ......
Read more >
input type="text" vs input type="search" in HTML5
There's no other option -- it's either got a special handling by the browser, or it doesn't. Right now, in most browsers, type=search...
Read more >
HTML Input Types - W3Schools
Here are the different input types you can use in HTML: <input type="button">; <input ... Tip: The default value of the type attribute...
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