react-datetime
react-datetime copied to clipboard
Select wrong date 31/08 v3.1.1
"react-datetime": "3.1.1"
select date 2021-09-01 then set date 2021-08-31 the date input shows 2021-08-01
I'm having the same issue for my application.
issue persists with latest version :(
the same issue for select date 2022-02-01 then set date 2022-01-31 the date input shows 2022-01-03 "react-datetime": "3.1.1"
Please help and fix this, no idea how to fix this my side here
the same issue for select date 2022-04-01 then set date 2022-03-31 the date input shows 2022-03-01 "react-datetime": "3.1.1"
I thought I was going crazy for June. Calendar is set to June 1st, open and select May 31st, date comes back as May 1st. Here is a console.log of what is returning on the onChange. Using 3.1.1
as well.

This is because, date is set before month which does not have day 31 in the implementation. changing the set order in code worked for me.
This is because, date is set before month which does not have day 31 in the implementation. changing the set order in code worked for me.
Where to write this code to solve the issue
This code is in DateTime.js: https://github.com/arqex/react-datetime/issues/744#issuecomment-707963852
The issue still persists with the latest version, any updates? :(
@Macy6 Can confirm that your force is perfect <3