-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Can't clear timepicker without adding extra button #5293
Comments
@asurinov, I'm not exactly sure what you're asking for here. Even our demo has an external button. Can you please elaborate? Thanks. |
I attach an example. Timepicker fields can't be cleared. For example, datepicker control supports such usecase. |
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. |
Another note. This can be seen in our demo page as well. |
@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. |
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. |
There is no ability to reset timepicker's model using keyboard, without adding extra button. Input value sets to '00' on blur.
The text was updated successfully, but these errors were encountered: