Pikatime: Kirby Time Picker Field

Hey everyone! A recent pull request by AhoyLemon inspired me to fix some things that have always bothered me with this plugin. I present: Pikatime (2.0) :wink:

The main change is that the green bubble is now draggable. It took me a while, but I finally landed on an architecture that I was happy with to keep track of the state of the dragging. (You can still just click on the numbers if you like.) I got the transitions back in too!

The plugin should also work better on touch devices. Dragging works, and the popup keyboard shouldn’t get in the way anymore. Unfortunately I only have access to two devices to test on, so you’ll have to let me know if you run into any problems.

As a side effect of this change, the code ended much easier to understand in my opinion, since there’s pretty much no trigonometry directly in the rendering code anymore. So that’s a bonus.

Let me know what you guys think.

4 Likes

I tested it right now and it works as expected. Only there is a strange bug when using to fields in a structure field modal: One field (the second one) works perfectly, the first field (start time) has the following error:

You can choose a hour and it switches to the “minute” version. But if you click (or drag) on a minute number, it changes the hour that you already chose. Has anyone the same error?