(nextFocusedDate)
| 607 | } |
| 608 | |
| 609 | onNextMonthTransition(nextFocusedDate) { |
| 610 | const { isRTL, numberOfMonths, daySize } = this.props; |
| 611 | const { calendarMonthWidth, monthTitleHeight } = this.state; |
| 612 | |
| 613 | let translationValue; |
| 614 | |
| 615 | if (this.isVertical()) { |
| 616 | const firstVisibleMonthWeeks = this.calendarMonthWeeks[1]; |
| 617 | const calendarMonthWeeksHeight = firstVisibleMonthWeeks * (daySize - 1); |
| 618 | translationValue = -(monthTitleHeight + calendarMonthWeeksHeight + 1); |
| 619 | } |
| 620 | |
| 621 | if (this.isHorizontal()) { |
| 622 | translationValue = -calendarMonthWidth; |
| 623 | if (isRTL) { |
| 624 | translationValue = 0; |
| 625 | } |
| 626 | |
| 627 | const visibleCalendarWeeks = this.calendarMonthWeeks.slice(2, numberOfMonths + 2); |
| 628 | const calendarMonthWeeksHeight = Math.max(0, ...visibleCalendarWeeks) * (daySize - 1); |
| 629 | const newMonthHeight = monthTitleHeight + calendarMonthWeeksHeight + 1; |
| 630 | this.adjustDayPickerHeight(newMonthHeight); |
| 631 | } |
| 632 | |
| 633 | this.setState({ |
| 634 | monthTransition: NEXT_TRANSITION, |
| 635 | translationValue, |
| 636 | focusedDate: null, |
| 637 | nextFocusedDate, |
| 638 | }); |
| 639 | } |
| 640 | |
| 641 | getFirstDayOfWeek() { |
| 642 | const { firstDayOfWeek } = this.props; |
no test coverage detected