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

Timepicker Doesn't have any validation #1253

Closed
harilalinapp opened this issue Nov 22, 2016 · 4 comments · Fixed by #2058
Closed

Timepicker Doesn't have any validation #1253

harilalinapp opened this issue Nov 22, 2016 · 4 comments · Fixed by #2058

Comments

@harilalinapp
Copy link

There is no validation in timepicker. Is it possible to return an null value if the validation fails?
That would be great.

@valorkin
Copy link
Member

if it will return null, you will not be able to use custom validation outside of timepicker
but there are a cases when it should return null

@artdias90
Copy link
Contributor

artdias90 commented Jul 5, 2017

Right now it returns the most recent valid value (or undefined), which is not the best. Only assigns a css-invalid class to input but that's not useful for form validation if you have webworkers and therefore no easy way into DOM

@valorkin
Copy link
Member

valorkin commented Jul 7, 2017

Is there are any standards for this behavior?

@artdias90
Copy link
Contributor

artdias90 commented Jul 7, 2017

I think together with setting has-error class, it should carry an Output()
e.g <timepicker (hasError)=""></timepicker> so we are free to decide how to take actions if an invalid hour or minute is set.

valorkin added a commit that referenced this issue Jul 19, 2017
fixes #2036
fixes #1981 ( + min max demo )
fixes #1973
close #1957 ( + seconds demo )
fixes #1935
fixes #1672
feat #1007 added keyboard and mousewheel support
fixes #962
fixes #793
fixes #173
fixes #1271 added custom validation demo
fixes #1539 bs4
fixes #1253 if input is invalid

* feat(timepicker): new timepicker implementation

* feat(timepicker): new timepicker implementation testing

* chore(timepicker): removed old timepicker implementation

* chore(mini-ngrx): added ngrx licence

* fix(timepicker): fix seconds

* fix(timepicker): fix custom validation demo

* fix(tests): fix tests & aot errors

* fix(timepicker): min max restrictions

* fix(timepicker): min max checks

* feat(timepicker): add inputs validation (#2187)

* feat(timepicker): add inputs validation

* fix(timepicker): add isPM support

* feat(timepicker): add isValid output

* feat(timepicker): added test plan (#2127)

* fix(timepicker): fix ngModelChange demo

* fix(test): fix unit tests

* docs(timepicker): fix docs conflict, add isValid description
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants