Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
className: PropTypes.string,
dayPickerRef: PropTypes.func,
getTodayButtonLabel: PropTypes.func,
hideTodayButton: PropTypes.bool,
isRange: PropTypes.bool,
onChange: PropTypes.func,
pickerClassName: PropTypes.string
};
let defaultProps = {
className: '',
dayPickerRef: () => {},
getTodayButtonLabel: (locale) => getMessage(locale, 'today'),
hideTodayButton: false,
isRange: false,
labels: ReactDayPicker.defaultProps.labels,
onChange: () => {},
pickerClassName: ''
};
export default
class DayPicker extends Component {
constructor(props) {
super(props);
this.state = {
date: props.date,
monthToDisplay: props.date
};
}
handleCaptionChange = ({ month, year, captionIndex }) => {
let monthToDisplay = captionIndex === 0 ?