We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 22727b7 commit 24a416cCopy full SHA for 24a416c
src/components/Calendar/index.js
@@ -497,10 +497,8 @@ class Calendar extends PureComponent {
497
isVertical ? this.styles.monthsVertical : this.styles.monthsHorizontal
498
)}>
499
{new Array(this.props.months).fill(null).map((_, i) => {
500
- let monthStep;
501
- if (this.props.calendarFocus === 'forwards') {
502
- monthStep = addMonths(this.state.focusedDate, i);
503
- } else {
+ let monthStep = addMonths(this.state.focusedDate, i);;
+ if (this.props.calendarFocus === 'backwards') {
504
monthStep = subMonths(this.state.focusedDate, this.props.months - 1 - i);
505
}
506
return (
0 commit comments