Working as expected.
Errors:
index.js:14 Uncaught RangeError: Use yyyy instead of YYYY for formating years; see: https://git.io/fxCyr
npm install react-datepicker --save
npm install --save @types/react-datepicker
in the first installation, it says:
date-fns
node ./docs/printV2Notice.js
Thank you for testing (â©—) date-fns v2!
In v2 we've introduced a number of breaking changes
that make date-fns even more consistent and reliable.
Please read the changelog carefully: https://git.io/fxCWb
in package.json from react-datepicker
"dependencies": {
"classnames": "^2.2.5",
"date-fns": "^2.0.0-alpha.23"
Month.prototype.render = function render() {
var showMonthYearPicker = this.props.showMonthYearPicker;
return React.createElement(
"div",
{
className: this.getClassNames(),
onMouseLeave: this.handleMouseLeave,
role: "listbox",
"aria-label": "month-" + formatDate(this.props.day, "yyyy-MM")
},
showMonthYearPicker ? this.renderMonths() : this.renderWeeks()
);
};
Fixed by #1769
I used to have the same issue a week ago and then it was quickly fixed.
I haven't change anything related to datepicker in my code since then but now I have this issue again.
This issue still persists in 2.7.0
Still seeing this behavior in 2.8.0
~This issue persists in 2.9.6. How is this still an issue? This completely breaks the component in Safari (13.0.2)...~
EDIT: I take that back, looks like it's working after all! Apologies