rcbyr / keen-slider

The HTML touch slider carousel with the most native feeling you will get.
https://keen-slider.io/
MIT License
4.57k stars 210 forks source link

How to find out which time is currently set on the Timepicker example #383

Open Strieglitz opened 8 months ago

Strieglitz commented 8 months ago

Hi, how can i access the current hour and minute that is displayed on the "Timepicker" example? After i spinned the Wheel i see the time but cannot find out how to read it into code with js.

ng9000 commented 4 months ago

hello @Strieglitz did you find solution to your problem?

NaNguyenn commented 3 weeks ago

I had the same problem, my solution was to read the relative or absolute value of the current slide (s.track.details.rel or s.track.details.abs respectively) then pass them in my setValue function to get the value of that slide. Hope this can help

ng9000 commented 3 weeks ago

@NaNguyenn I can't figure out from where to read these values (s.track.details.rel or s.track.details.abs respectively) can you share a sandbox for it if possible?

NaNguyenn commented 3 weeks ago

sure, this is the sandbox of my solution sandbox. I think there are better solutions than this but I hope it can help you.