Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating time from outside timekeeper's onChange, new time is lost on next change #92

Open
ecrookoh opened this issue Apr 26, 2022 · 0 comments
Labels

Comments

@ecrookoh
Copy link

ecrookoh commented Apr 26, 2022

Hi,

I've run into an issue when updating the time for the timekeeper from outside the timekeeper component while using v.2.2.1. The new time will show up on the clock, but when I try to change either the hour or the minute, part of the time will revert back to the initial value that was set for the timekeeper.

I created a CodeSandbox that shows the issue: https://codesandbox.io/s/sweet-tamas-q0jc2e?file=/src/App.js
Steps to reproduce:

  1. Click "Update Time Outside" button. Time should be shown as 11:15 AM.
  2. Change hour to a new value. Minutes shown on the clock will revert to the initial value of ":34". Using the hour dropdown or the hour hand to change the time gives the same result.

The same issue shows up when the time is updated from outside and then the minute is changed. In that case the hour is reverted to the initial value.

I tested previous version of the timekeeper to see how far back this issue occurred. The first version where it shows up is 2.2.0.
Version 2.1.3 does not seem to have the problem.

Please let me know if there is an alternate way that I should be updating the time from outside the Timekeeper, or if you need any other information.

@catc catc added the bug label Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants