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_test.test.tsx Test Case Issue #5252

Closed
balajis-qb opened this issue Dec 1, 2024 · 0 comments · Fixed by qburst/react-datepicker-3#40 or #5253
Closed

calendar_test.test.tsx Test Case Issue #5252

balajis-qb opened this issue Dec 1, 2024 · 0 comments · Fixed by qburst/react-datepicker-3#40 or #5253

Comments

@balajis-qb
Copy link

Describe the bug
In calendar_test.test.tsx file - We have an issue with the test block should not have previous month button when selecting a date in the second month, when min date is specified.

image

As you could see from the above screenshot, we're setting the min and the max date for testing previous month button disable case, but inorder for it to work, we need to navigate to the least possible month that we can select and continue the test case. In this example, we set the minDate to new Date("2024-11-06") assuming the calendar month will be always in November, 2024. But it's failing now as the current month changed to December 2024.

To Reproduce
$yarn test

Fix
As a fix, we need to programatically switch back the configured min month or set the selected date same as the minDate's month.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment