<commit_before>import React from 'react';
import DayPicker from '../../../src';

import '../../../src/style.css';
import '../styles/year.css';

export default class YearCalendar extends React.Component {

  constructor(props) {
    super(props);
    this.showPrevious = this.showPrevious.bind(this);
    this.showNext = this.showNext.bind(this);
  }
  state = {
    year: (new Date()).getFullYear(),
  };
  showPrevious() {
    this.setState({
      year: this.state.year - 1,
    });
  }
  showNext() {
    this.setState({
      year: this.state.year + 1,
    });
  }
  render() {
    const { year } = this.state;
    return (
      <div className="YearCalendar">
        <h1>
          <a onClick={ this.showPrevious }>{ year - 1 }</a>
          { year }
          <a onClick={ this.showNext }>{ year + 1 }</a>
        </h1>
        <DayPicker
          canChangeMonth={ false }
          initialMonth={ new Date(year, 0, 1) }
          numberOfMonths={ 12 }
        />
      </div>
    );
  }

}
<commit_msg>Use month instead of initialMonth<commit_after>import React from 'react';
import DayPicker from '../../../src';

import '../../../src/style.css';
import '../styles/year.css';

export default class YearCalendar extends React.Component {

  constructor(props) {
    super(props);
    this.showPrevious = this.showPrevious.bind(this);
    this.showNext = this.showNext.bind(this);
  }
  state = {
    year: (new Date()).getFullYear(),
  };
  showPrevious() {
    this.setState({
      year: this.state.year - 1,
    });
  }
  showNext() {
    this.setState({
      year: this.state.year + 1,
    });
  }
  render() {
    const { year } = this.state;
    return (
      <div className="YearCalendar">
        <h1>
          <a onClick={ this.showPrevious }>{ year - 1 }</a>
          { year }
          <a onClick={ this.showNext }>{ year + 1 }</a>
        </h1>
        <DayPicker
          canChangeMonth={ false }
          month={ new Date(year, 0, 1) }
          numberOfMonths={ 12 }
        />
      </div>
    );
  }

}

{'fraction_non_alphanumeric': 0.171007371007371, 'fraction_numerical': 0.009828009828009828, 'mean_word_length': 1.9897209985315711, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2255371', 'n_tokens_mistral': 667, 'n_tokens_neox': 656, 'n_words': 146}