A simple Yearpicker component for React
The package can be installed via NPM:
npm install react-year-picker --save
import React from "react";
import YearPicker from "react-year-picker";
class Example extends React.Component {
constructor(props) {
super(props);
this.handleChange = this.handleChange.bind(this);
}
handleChange(date) {
console.log(date);
}
render() {
return <YearPicker onChange={this.handleChange} />;
}
}
The year picker is compatible with the latest versions of Chrome, Firefox, and IE11+.