Skip to content

Commit 50555aa

Browse files
author
Kubit
committed
Improve Calendar component
1 parent cf372cc commit 50555aa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/components/calendar/calendarStandAlone.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ const CalendarStandAloneComponent = (
2525
const today = new Date();
2626

2727
return (
28-
<CalendarStyled ref={ref} data-testid={dataTestId} id={props.id} styles={props.styles}>
28+
<CalendarStyled
29+
ref={ref}
30+
data-calendar
31+
data-testid={dataTestId}
32+
id={props.id}
33+
styles={props.styles}
34+
>
2935
<Selector
3036
configAccesibility={props.configAccesibility}
3137
configCalendar={props.configCalendar}

src/components/calendar/utils/handleKeysmoves.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export const handleKeyDownMove = ({
7575
}
7676
// to go to max date if next day below is disabled unless it is the max date
7777
if (
78-
previous + firstEmptyAndDisabledDays + 1 >= maxDate.getDate() - 7 &&
78+
previous + firstEmptyAndDisabledDays + 1 >=
79+
maxDate.getDate() + firstEmptyAndDisabledDays - 7 &&
7980
previous !== daysAndEmptyDaysUntilMaxDate
8081
) {
8182
return maxDate.getDate() + firstEmptyAndDisabledDays - 1;

0 commit comments

Comments
 (0)