(nextFocusedDate)
| 544 | } |
| 545 | |
| 546 | onPrevMonthTransition(nextFocusedDate) { |
| 547 | const { daySize, isRTL, numberOfMonths } = this.props; |
| 548 | const { calendarMonthWidth, monthTitleHeight } = this.state; |
| 549 | |
| 550 | let translationValue; |
| 551 | if (this.isVertical()) { |
| 552 | const calendarMonthWeeksHeight = this.calendarMonthWeeks[0] * (daySize - 1); |
| 553 | translationValue = monthTitleHeight + calendarMonthWeeksHeight + 1; |
| 554 | } else if (this.isHorizontal()) { |
| 555 | translationValue = calendarMonthWidth; |
| 556 | if (isRTL) { |
| 557 | translationValue = -2 * calendarMonthWidth; |
| 558 | } |
| 559 | |
| 560 | const visibleCalendarWeeks = this.calendarMonthWeeks.slice(0, numberOfMonths); |
| 561 | const calendarMonthWeeksHeight = Math.max(0, ...visibleCalendarWeeks) * (daySize - 1); |
| 562 | const newMonthHeight = monthTitleHeight + calendarMonthWeeksHeight + 1; |
| 563 | this.adjustDayPickerHeight(newMonthHeight); |
| 564 | } |
| 565 | |
| 566 | this.setState({ |
| 567 | monthTransition: PREV_TRANSITION, |
| 568 | translationValue, |
| 569 | focusedDate: null, |
| 570 | nextFocusedDate, |
| 571 | }); |
| 572 | } |
| 573 | |
| 574 | onMonthChange(currentMonth) { |
| 575 | this.setCalendarMonthWeeks(currentMonth); |
no test coverage detected