Skip to content

Commit 016edfd

Browse files
committed
Fix 0 indexing
1 parent b5f3b11 commit 016edfd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/MonthSelector.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,15 +83,15 @@ class MonthSelector extends React.Component {
8383
style={styles.monthButton}
8484
onClick={() => this.onSelect(month)}
8585
>
86-
{moment().month(month - 1).format("MMM")}
86+
{moment().month(month).format("MMM")}
8787
</Button>
8888
</div>
8989
);
9090
}
9191

9292
render() {
9393
const months = [];
94-
for (var i = 1; i <= 12; i++) {
94+
for (var i = 0; i < 12; i++) {
9595
months.push(this.renderMonth(i));
9696
}
9797

0 commit comments

Comments
 (0)