Skip to content

Input type="number" #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hsb1007 opened this issue Sep 7, 2014 · 1 comment
Open

Input type="number" #8

hsb1007 opened this issue Sep 7, 2014 · 1 comment

Comments

@hsb1007
Copy link

hsb1007 commented Sep 7, 2014

Hi I am using your directive and i love it.

Is there any way to make it work with input type="number"?

It is particularly for mobile so that when the input field is in focus, it brings up the number key pad rather than text keyboard.

@thatmarvin
Copy link
Member

Awesome! Per issue #7, there are issues with type="number" stemming from imperfect browser specs/implementations that Angular cannot or has not been able to fix 100%. From a quick reexamination, the situation has not improved so I'll have to keep this implementation.

If triggering the numeric keypad is all you're looking for, can you use <input pattern="[0-9]*" …> instead? You can't enter decimal points this way though…

How about making it such that it behaves like how you'd enter decimals in ATMs, e.g. pressing 1234 triggers this sequence: 0.01 --> 0.12 --> 1.23 --> 12.34?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants