MCPcopy Index your code
hub / github.com/react-dates/react-dates / maybeTransitionNextMonth

Method maybeTransitionNextMonth

src/components/DayPicker.jsx:750–763  ·  view source on GitHub ↗
(newFocusedDate)

Source from the content-addressed store, hash-verified

748 }
749
750 maybeTransitionNextMonth(newFocusedDate) {
751 const { numberOfMonths } = this.props;
752 const { currentMonth, focusedDate } = this.state;
753
754 const newFocusedDateMonth = newFocusedDate.month();
755 const focusedDateMonth = focusedDate.month();
756 const isNewFocusedDateVisible = isDayVisible(newFocusedDate, currentMonth, numberOfMonths);
757 if (newFocusedDateMonth !== focusedDateMonth && !isNewFocusedDateVisible) {
758 this.onNextMonthTransition(newFocusedDate);
759 return true;
760 }
761
762 return false;
763 }
764
765 maybeTransitionPrevMonth(newFocusedDate) {
766 const { numberOfMonths } = this.props;

Callers 2

onFinalKeyDownMethod · 0.95
DayPicker_spec.jsxFile · 0.80

Calls 2

onNextMonthTransitionMethod · 0.95
isDayVisibleFunction · 0.85

Tested by

no test coverage detected