Skip to content

Commit 47f17f7

Browse files
committed
prevent focusing of hidden duplicate days
between months
1 parent 10e64e2 commit 47f17f7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/day.jsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,13 @@ export default class Day extends React.Component {
323323
) {
324324
shouldFocusDay = true;
325325
}
326+
//day is one of the non rendered duplicate days
327+
if (this.props.monthShowsDuplicateDaysEnd && this.isAfterMonth()) {
328+
shouldFocusDay = false;
329+
}
330+
if (this.props.monthShowsDuplicateDaysStart && this.isBeforeMonth()) {
331+
shouldFocusDay = false;
332+
}
326333
}
327334

328335
shouldFocusDay && this.dayEl.current.focus({ preventScroll: true });

0 commit comments

Comments
 (0)