react-datetime icon indicating copy to clipboard operation
react-datetime copied to clipboard

Select wrong date 31/08 v3.1.1

Open NamPhan29117 opened this issue 3 years ago • 10 comments

"react-datetime": "3.1.1"

select date 2021-09-01 then set date 2021-08-31 the date input shows 2021-08-01

NamPhan29117 avatar Sep 08 '21 07:09 NamPhan29117

I'm having the same issue for my application.

katesroad avatar Sep 13 '21 15:09 katesroad

issue persists with latest version :(

ShaiGilboa avatar Jan 07 '22 22:01 ShaiGilboa

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"

VAKHULA avatar Mar 01 '22 09:03 VAKHULA

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"

rxviperx avatar Apr 01 '22 10:04 rxviperx

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.

Screen Shot 2022-05-31 at 8 06 41 AM

iantbarker avatar Jun 01 '22 13:06 iantbarker

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. image

hrhrsdn avatar Jun 21 '22 12:06 hrhrsdn

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. image

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

Macy6 avatar Nov 10 '22 17:11 Macy6

The issue still persists with the latest version, any updates? :(

Macy6 avatar Nov 10 '22 17:11 Macy6

@Macy6 Can confirm that your force is perfect <3

tinhtony2506 avatar Feb 02 '23 08:02 tinhtony2506