Skip to content

Commit

Permalink
Fixed #294
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici authored and Çağatay Çivici committed Feb 13, 2018
1 parent a9f52c4 commit a8cdad3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,8 +266,8 @@ export class Calendar extends Component {
month = 11;
year--;

if(this.props.yearNavigator && year < this.props.yearOptions[0]) {
year = this.props.yearOptions[this.props.yearOptions.length - 1];
if(this.props.yearNavigator && year < this.yearOptions[0]) {
year = this.yearOptions[this.yearOptions.length - 1];
}
}
else {
Expand Down Expand Up @@ -296,8 +296,8 @@ export class Calendar extends Component {
month = 0;
year++;

if(this.props.yearNavigator && year > this.props.yearOptions[this.props.yearOptions.length - 1]) {
year = this.props.yearOptions[0];
if(this.props.yearNavigator && year > this.yearOptions[this.yearOptions.length - 1]) {
year = this.yearOptions[0];
}
}
else {
Expand Down

0 comments on commit a8cdad3

Please sign in to comment.