-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
ion-input with type "number" conflicts with maxlength attribute #7072
Comments
Hello, thanks for opening an issue with us! The |
my solution is put input type as a "tel", Because maxlength work with input type as a text & telephone number in ionic 2.
|
@dilhan119 , please, what is the type 'tel'? is it a type you created? If so, how can I create it? I put type tel here and is the same as text I guess... |
@GabrielDvt it's one of the new input types introduced in HTML5. It is similar to other newly introduced types such as <input type="tel" placeholder="Your phone number"> This is an HTML5 built-in type and you don't need anything extra to make use of it. |
@dilhan119 but if we use tel in the place of number, even letters are getting accepted. how to get rid of that ? |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Short description of the problem:
ion-input with type "number" conflicts with maxlength attribute, so that the number of characters we input can be more than maxlength. Change type to "tel", everything will be ok.
Steps to reproduce:
Other information:
Checked on Chrome browsers and on Android 6.0.
Which Ionic Version?
2.0.0-beta.9
Run ionic info from terminal/cmd prompt: (paste output below)
Cordova CLI: 6.2.0
Ionic Framework Version: 2.0.0-beta.9
Ionic CLI Version: 2.0.0-beta.32
Ionic App Lib Version: 2.0.0-beta.18
OS: Mac OS X El Capitan
Node Version: v5.11.1
The text was updated successfully, but these errors were encountered: