axiom-react-calendar
Version:
A component for picking dates or date periods for your React application.
34 lines (28 loc) • 727 B
JSX
import React, { PureComponent } from 'react';
import PropTypes from 'prop-types';
import Months from './YearView/Months';
import { isMaxDate, isMinDate, isValue } from './shared/propTypes';
export default class YearView extends PureComponent {
renderMonths() {
return (
<Months {...this.props} />
);
}
render() {
return (
<div className="react-calendar__year-view">
{this.renderMonths()}
</div>
);
}
}
YearView.propTypes = {
activeStartDate: PropTypes.instanceOf(Date).isRequired,
formatMonth: PropTypes.func,
maxDate: isMaxDate,
minDate: isMinDate,
onChange: PropTypes.func,
setActiveRange: PropTypes.func,
value: isValue,
valueType: PropTypes.string,
};