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

🧪 Fix the test case failing issue by setting the selected date to be same as the configured least possible month date #5253

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/test/calendar_test.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -449,12 +449,17 @@ describe("Calendar", () => {
});

it("should not have previous month button when selecting a date in the second month, when min date is specified", () => {
const minDate = new Date("2024-11-06");
const maxDate = new Date("2025-01-01");
const selectedDate = minDate;

const { container } = render(
<DatePicker
inline
monthsShown={2}
minDate={new Date("2024-11-06")}
maxDate={new Date("2025-01-01")}
selected={selectedDate}
minDate={minDate}
maxDate={maxDate}
/>,
);

Expand Down
Loading