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

Calendar not displaying screen containing minDate when passing dynamic value #410

Open
2 tasks done
MarinaGhe opened this issue Apr 20, 2022 · 2 comments
Open
2 tasks done
Labels
bug Something isn't working fresh

Comments

@MarinaGhe
Copy link

MarinaGhe commented Apr 20, 2022

Before you start - checklist

  • I followed instructions in documentation written for my React-Date-Picker version
  • I have checked if this bug is not already reported

Unexpected behaviour when passing minDate and maxDate through props.
I'm passing minDate value through props inside my DatePicker component and I have some weird scenarios.

Expected behavior

The react date picker element/wrapper should always be clickable in order to open the calendar.
The calendar screen shown after minDate is updated should be the one containing the minDate value or date value.

Actual behavior

  1. If I have already selected a value in the DatePicker and the minDate props updates with another value, the calendar only opens when clicking on the icon or inside the input. The rest of the react date picker/wrapper element it's not clickable anymore.

  2. If I have already selected a value in the DatePicker and the minDate props updates with another value greater than the date value, the input is updated with the minDate value and the click problem persists.

  3. If I have already selected a value in the DatePicker and I open the calendar screen after minDate is updated, the dates displayed are not the ones containing minDate even if I update the date also.

EDIT:
4. I found another use case which can be seen on the online demo page. If you select a date from the picker and then you try to change it from the input, the value does not update. These type of things seem to happen when you first select or set a value for your date and then you try to update another prop or something.

Additional information

All the values in my state are updating accordingly.
It's my first time using this component so maybe there is something I'm missing.
I'm using react hooks v 17.0.2 and latest version of this module.
Any info or help on this is very appreciated.

Thanks a lot!

@MarinaGhe MarinaGhe added the bug Something isn't working label Apr 20, 2022
@github-actions

This comment was marked as outdated.

@github-actions github-actions bot added the stale label Jul 25, 2022
@github-actions

This comment was marked as outdated.

@wojtekmaj wojtekmaj reopened this Sep 14, 2022
@wojtekmaj wojtekmaj added fresh and removed stale labels Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fresh
Projects
None yet
Development

No branches or pull requests

2 participants