vuetify icon indicating copy to clipboard operation
vuetify copied to clipboard

Variable sync problem on time picker

Open Adzouz opened this issue 9 years ago • 8 comments

Hi ! I've noticed a strange behaviour in the sync of the v-model variable defined in the v-time-picker and its associated v-text-field.

Steps to reproduce

When you select hours and minutes for the first time, the variable defined in v-model is updated but nothing happens in the v-text-field. When you click again and change only minutes, again nothing happens in v-text-field. But if you change hours and then after change minutes, the value will appear in v-text-field.

Versions

Vue version : 2.4 Vuetify version : 0.15.7 All browsers

What is expected ?

Whenever I change the time (hour, minute or AM / PM), the value in v-text-field should be visible and updated in live.

What is actually happening ?

The v-text-field is not synced at every changes in v-time-picker.

Reproduction Link

https://codepen.io/TheWebsDoor/pen/jGmGQy

I've noticed a little mistake in your documentation : "#9 Time pickers - In dialog and menu". You use the same variable for both examples (menu and modal) and when you update the value, you can see that there's a v-text-field synchronization problem. If you want to keep the same variable for both examples, the value should be visible and updated in both fields.

Thanks !

Adzouz avatar Sep 28 '17 10:09 Adzouz

Duplicate of #1726

KaelWD avatar Sep 28 '17 12:09 KaelWD

I'm sorry to bother you, but it seems that this bug haven't been resolved. On the documentation, it still not working, you can check by yourself at step 9 : https://vuetifyjs.com/components/pickers. Or maybe the doc is not updated and there are some new attributes to make it work ?

Adzouz avatar Sep 28 '17 14:09 Adzouz

Is has been fixed for the upcoming release. The documentation does not include the current development version.

nekosaur avatar Sep 28 '17 14:09 nekosaur

Okay, I'll wait for the next version so. I came up with a workaround for now. Thank you !

Adzouz avatar Sep 28 '17 14:09 Adzouz

@TheWebsDoor Could you post the workaround until the new version is released? @nekosaur Any estimation on when will the new version be released?

Eylen avatar Oct 02 '17 09:10 Eylen

@Eylen October 4th. There's a beta out now on the releases page.

KaelWD avatar Oct 02 '17 09:10 KaelWD

I have to admit that I'm not very proud about my workaround... The idea is to replace the v-text-field by a simple div (because the problem seems to be the variable change event on the v-text-field). I use CSS class or CSS override to make it look like a v-text-field. The div have the property slot="activator" to show the picker.

Adzouz avatar Oct 03 '17 13:10 Adzouz

@TheWebsDoor A workaround is a workaround after all :+1:

codeinearts avatar Jul 09 '18 22:07 codeinearts