Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Can't clear timepicker without adding extra button #5293

Closed
asurinov opened this issue Jan 18, 2016 · 7 comments
Closed

Can't clear timepicker without adding extra button #5293

asurinov opened this issue Jan 18, 2016 · 7 comments

Comments

@asurinov
Copy link
Contributor

There is no ability to reset timepicker's model using keyboard, without adding extra button. Input value sets to '00' on blur.

@icfantv
Copy link
Contributor

icfantv commented Jan 18, 2016

@asurinov, I'm not exactly sure what you're asking for here. Even our demo has an external button. Can you please elaborate? Thanks.

@asurinov
Copy link
Contributor Author

example

@asurinov
Copy link
Contributor Author

I attach an example. Timepicker fields can't be cleared. For example, datepicker control supports such usecase.

@icfantv
Copy link
Contributor

icfantv commented Jan 18, 2016

Got it. I would revise the reproducibility steps to include delete the contents of the field and then click off to force it to lose focus. Feel free to submit a PR for this if you want to take a gander. Until I am overruled, I think this is something we could/should fix.

@icfantv
Copy link
Contributor

icfantv commented Jan 18, 2016

Another note. This can be seen in our demo page as well.

@icfantv
Copy link
Contributor

icfantv commented Jan 18, 2016

@asurinov, reading the code, it looks like this may be intentional behavior to prevent the user from having invalid data entered: https://github.com/angular-ui/bootstrap/blob/master/src/timepicker/timepicker.js#L353-L362.

I'm going to wait to see what the devs decide here before promising anything.

@wesleycho
Copy link
Contributor

I'd argue this is by design - this doesn't have any buttons except to increment or decrement. However the user wants a clear button, we leave it up to the user to implement and choose where to locate it to take minimal opinion.

asurinov added a commit to HawkHouseIntegration/bootstrap that referenced this issue Jan 19, 2016
asurinov added a commit to HawkHouseIntegration/bootstrap that referenced this issue Jan 19, 2016
@wesleycho wesleycho modified the milestone: 1.2.3 Mar 6, 2016
@wesleycho wesleycho added this to the 1.3.0 milestone Mar 24, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants