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

Method maybeTransitionPrevMonth

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

Source from the content-addressed store, hash-verified

763 }
764
765 maybeTransitionPrevMonth(newFocusedDate) {
766 const { numberOfMonths } = this.props;
767 const { currentMonth, focusedDate } = this.state;
768
769 const newFocusedDateMonth = newFocusedDate.month();
770 const focusedDateMonth = focusedDate.month();
771 const isNewFocusedDateVisible = isDayVisible(newFocusedDate, currentMonth, numberOfMonths);
772 if (newFocusedDateMonth !== focusedDateMonth && !isNewFocusedDateVisible) {
773 this.onPrevMonthTransition(newFocusedDate);
774 return true;
775 }
776
777 return false;
778 }
779
780 isHorizontal() {
781 const { orientation } = this.props;

Callers 2

onFinalKeyDownMethod · 0.95
DayPicker_spec.jsxFile · 0.80

Calls 2

onPrevMonthTransitionMethod · 0.95
isDayVisibleFunction · 0.85

Tested by

no test coverage detected