Skip to content

Commit 24a416c

Browse files
lexispikekamyar
andauthored
Update src/components/Calendar/index.js
Co-authored-by: kamyar <[email protected]>
1 parent 22727b7 commit 24a416c

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/components/Calendar/index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,10 +497,8 @@ class Calendar extends PureComponent {
497497
isVertical ? this.styles.monthsVertical : this.styles.monthsHorizontal
498498
)}>
499499
{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 {
500+
let monthStep = addMonths(this.state.focusedDate, i);;
501+
if (this.props.calendarFocus === 'backwards') {
504502
monthStep = subMonths(this.state.focusedDate, this.props.months - 1 - i);
505503
}
506504
return (

0 commit comments

Comments
 (0)