-
Notifications
You must be signed in to change notification settings - Fork 163
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
Time picker returns 00:00 when clear the value. #8548
Comments
The |
The TimePicker was initially designed with the mindset of never having a falsy value. This is the reason why if you clear the editor, the picker will emit a value with hours, minutes and seconds set to @kdinev While I agree that setting the TimePicker's |
@jackofdiamond5 I would actually disagree with you. Since the timepicker is a component we created with the intention of modifying an existing The usual use cases are either the timepicker is presented after a date is picked from a datepicker, for modification of the time portion of the value coming from the datepicker, or a timepicker is presented in a UI with an already existing Date object that it;s bound to, populated from a service or created in another application view. |
As obvious as it is I hadn't thought about that. So I guess it's an expected behavior that during typing the TimePicker throws if a falsy value is bound to its model. It still spawns a |
There has been no recent activity and this issue has been marked inactive. |
There has been no recent activity and this issue has been marked inactive. |
Description
Describe the issue.
Steps to reproduce
https://stackblitz.com/edit/timepicker-null?file=src%2Fapp%2Ftimepicker-sample-1%2Ftimepicker-sample-1.component.ts
Result
Time picker returns 00:00 as value.
Expected result
Time picker returns null the same as the initial value.
The text was updated successfully, but these errors were encountered: