Vuepic / vue3-date-time-picker

Datepicker component for Vue 3
https://vue3datepicker.com
MIT License
159 stars 12 forks source link

Programmatically set the value of a time-picker not working #37

Closed ekkode closed 3 years ago

ekkode commented 3 years ago

Describe the bug I try to set the value programmatically to a time-picker, however the value is not visible until I click on the input.

To Reproduce Please see the example here https://codesandbox.io/s/vue3-date-time-picker-demo-forked-7zney?file=/src/components/Demo.vue

Expected behavior I expect that the value in the field to be updated without necessary clicking on the input.

ekkode commented 3 years ago

This is working only if I do a rerender of the component, but is not quite nice.

Please check here: https://codesandbox.io/s/vue3-date-time-picker-demo-forked-0rfv1?file=/src/components/Demo.vue

Or do I miss something?

Jasenkoo commented 3 years ago

The issue was fixed (#20). Please update the component to at least 2.1.8.

On the latest, working fine: https://codesandbox.io/s/vue3-date-time-picker-demo-forked-9h5cd

ekkode commented 3 years ago

@Jasenkoo I just did it however still not working plase check here : https://codesandbox.io/s/vue3-date-time-picker-demo-forked-7zney?file=/src/components/Demo.vue

Jasenkoo commented 3 years ago

@ekkode Sorry, my bad, I checked on working sandbox. I will fix it in the next patch.

ekkode commented 3 years ago

Thanks!

In the meantime I will use the rerender workaround as I said here: https://github.com/Vuepic/vue3-date-time-picker/issues/37#issuecomment-958755398

Jasenkoo commented 3 years ago

The issue is fixed in the new version 2.3.3

videk11 commented 2 years ago

Hello @Jasenkoo

I think this issue is still present. If you use only timepicker and you have a custom #dp-input slot and then set model value, you have to click into the custom input. Only after that, the value is updated in the input.

Jasenkoo commented 2 years ago

@videk11 Will check