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

Changing current prop does not reload the calendar #150

Open
Hiszpan opened this issue Mar 20, 2024 · 0 comments
Open

Changing current prop does not reload the calendar #150

Hiszpan opened this issue Mar 20, 2024 · 0 comments

Comments

@Hiszpan
Copy link

Hiszpan commented Mar 20, 2024

Describe the bug
After update const holding current value calendar still displays old date.

To Reproduce
Steps to reproduce the behavior:
implement code:

const [current, setCurrent] = useState('1990-01-03');
useEffect(() => {
  setTimeout(() => {
    setCurrent('2000-12-09');
  }, 2000);
}, []);

<ModernDatePicker
  mode='calendar'
  current={current}
/>

Expected behavior
Calendar should change year and month to 2000-12-09.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant