Vuetify: 1.1.1
Vue: 2.5.2
Browsers: Chrome 67.0.3396.99
OS: Windows 10
The time picker should always default to selecting hours when opened in a dialog or menu. Perhaps, when the dialog is closed, the picker should reset selectingHour
to true
.
Opening a time picker in a dialog or menu for the first time shows hours. When I re-open the dialog, it always shows minutes until I specifically click on hours.
https://codepen.io/anon/pen/aKgzzm?editors=1010#0
Likely related to the issue from PR 4198.
Slight correction. It's not that it always shows minutes after the first time, it's simply that it remembers the last used type.
Workaround: use <v-time-picker v-if="menu/dialog model">
Workaround 2:
https://codepen.io/anon/pen/VBoqaB?editors=1000
Requires ref
for v-time-picker
but preserves closing animation
Needs keep-content-alive prop to be implemented (see #4518)
Looks like this bug is a "reimplementation" of #1549
Can't we just set this.selecting = selectingTimes.hour
as I've done in e8bac4e?
Maybe put it in onChange ()
like this:
onChange () {
if (this.selecting === selectingTimes.hour) {
this.selecting = selectingTimes.minute
} else if (this.useSeconds && this.selecting === selectingTimes.minute) {
this.selecting = selectingTimes.second
} else {
this.selecting = selectingTimes.hours // <-- here it goes?
}
// ...
}
I can't test this right now but maybe tomorrow
Most helpful comment
Workaround 2:
https://codepen.io/anon/pen/VBoqaB?editors=1000
Requires
ref
forv-time-picker
but preserves closing animation