Skip to content
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

Missing min/max on textfield #99

Closed
grizzm0 opened this issue Sep 21, 2016 · 6 comments
Closed

Missing min/max on textfield #99

grizzm0 opened this issue Sep 21, 2016 · 6 comments
Assignees

Comments

@grizzm0
Copy link

grizzm0 commented Sep 21, 2016

Min/max attributes are missing in textfield with type number.

See https://jsfiddle.net/hv28yrfv/1/

@mseemann
Copy link
Owner

this isn't difficult to add. Did i mention, that this project is open for pull requests? :)

@grizzm0
Copy link
Author

grizzm0 commented Sep 21, 2016

Sure. :)

Not quite sure how it should work tho...

Max/min is only allowed if type is number. Should I create another *ngIf just for this purpose?
What should default of min be if not set?
What should default of max be if not set?

@mseemann
Copy link
Owner

mseemann commented Sep 21, 2016

i would suggest do not any special logic. just propagate the attribute from the wrapper element down to the input element and let the browser implementation/angular do the rest (like it was implemented for name or placeholder).

@simonschllng
Copy link

I can't test it atm, but hope this helps:
min_max.patch.txt

@grizzm0
Copy link
Author

grizzm0 commented Sep 23, 2016

@simonschllng Feel free to create a PR if you already have a patch. I've been quite busy lately and haven't had the time to do so.

@mseemann
Copy link
Owner

@simonschllng Thanks for your help!

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

No branches or pull requests

3 participants