slider icon indicating copy to clipboard operation
slider copied to clipboard

Usign :lazy="false" does not work propelry with VueDatePicker

Open lealea401 opened this issue 2 years ago • 1 comments

I am trying to drag the slider in order to update the date in the VueDatePicker calendar while dragging. I am using "@vuepic/vue-datepicker": "^5.2.0" and "@vueform/slider": "^2.1.7", If I use lazy false I can drag one step, but then the functionallity stops and I then I need to drag again. If I use "@vueform/slider": "^1.0.5" it works more or less but the dragging is not smooth along the slider. It has some delay. Could there be a solution for it? Is there any incompatibility between the two components?

lealea401 avatar Jun 09 '23 17:06 lealea401

I think I have the same problem but I'm not using @vuepic/vue-datepicker

Juste @vueform/slider and when I drag the slider and updating the model value in the parent via an emit.

I loose the focus on the slider and need to re-click and drag. I can only change by 1 unit (with a step of 1)

Could this be happening because :

  • we drag,
  • modify the value
  • emit to parent
  • the parent give the new value to the child component (the slider)
  • and the slider loose focus because of the change of the value?

Seems weird but maybe it's an explanation.

After some more digging, it seems that this behavior happens when two events are used together.

Like @update and @end or @change and @update or @slide and @change

Is it bad practice to use two ?

For example when I'm dragging on a tablet/phone the tooltip doesn't show, so I wanted to update the model to show the user somewhere else the result of the dragging. While I want to make a call to the server when the user release the drag.

Thanks if anyone find a way to make this work ! :)

dib258 avatar Jun 29 '23 21:06 dib258