dan-lee / timescape

A flexible, headless date and time input library for JavaScript. Provides tools for building fully customizable date and time input fields, with support for libraries like React, Preact, Vue, Svelte and Solid.
https://timescape.daniellehr.de
MIT License
159 stars 2 forks source link

[Bug] Actual date and displayed date can get out of sync #4

Closed fweinaug closed 1 year ago

fweinaug commented 1 year ago

After entering a digit in any of the input fields, the input might wait for more input, for example entering 3 as minutes could mean 3 or 30 to 39 minutes. If the user is using the arrow up/down key while the input field is waiting for more input, the actual date changes but the input field does not change. Also, the user can leave the input field with the arrow left/right key or by clicking on a different input field. In those cases the digit should be used as the new value, be shown in the input field and the input field should stop waiting for more input. Otherwise the actual date and the date the user sees will be different.

The issue is reproducible in this example. Let me know if you need more details.

dan-lee commented 1 year ago

Oh, great catch of this oversight. Thank you! Will address this

dan-lee commented 1 year ago

Released in v0.2.1 🚀