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

Select wrong date 31/08 v3.1.1

Open tinhtony2506 opened this issue 2 years ago • 11 comments

"react-datetime": "3.1.1"

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

tinhtony2506 avatar Sep 06 '22 01:09 tinhtony2506

https://github.com/arqex/react-datetime/issues/804

tinhtony2506 avatar Sep 06 '22 01:09 tinhtony2506

issue persists with latest version :(

tinhtony2506 avatar Sep 06 '22 01:09 tinhtony2506

yes, this issue still persists in the latest version. Is there any solution to solve this issue?

bhavinzwt avatar Nov 01 '22 07:11 bhavinzwt

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

Macy6 avatar Nov 10 '22 17:11 Macy6

Before:

image

After:

image

I am facing the same problem so I have checked and I found an issue in _updateDate method of DateTime.js file line number 349. There is something wrong with the moment after use of moment([2022,10,31] ) format it is working fine.

I am not sure whether it helps you or not, but it's working fine for me.

UP1503 avatar Nov 11 '22 10:11 UP1503

Thanks so much for sharing your solution! Unfortunately, this is still not working for me... I'll post my fix here if I could make it work!

Macy6 avatar Nov 14 '22 04:11 Macy6

Thanks so much for sharing your solution! Unfortunately, this is still not working for me... I'll post my fix here if I could make it work!

image

Hello @Macy6 Still facing the same problem and using onChange event for date update that time also need to do change for line no. 362 which I have marked in the attached image. This is work for me.

If you have already solved this issue with better solution, please share your solution.

UP1503 avatar Jan 03 '23 15:01 UP1503

Thanks so much for sharing your solution! Unfortunately, this is still not working for me... I'll post my fix here if I could make it work!

image

Hello @Macy6 Still facing the same problem and using onChange event for date update that time also need to do change for line no. 362 which I have marked in the attached image. This is work for me.

If you have already solved this issue with better solution, please share your solution.

Hey @UP1503, can confirm that your solution works for me! I really appreciate your help!! Happy New Year xD

Macy6 avatar Jan 04 '23 18:01 Macy6

@Macy6 is it working on your site ?

tinhtony2506 avatar Feb 01 '23 09:02 tinhtony2506

@Macy6 Can confirm that your force is perfect <3

tinhtony2506 avatar Feb 02 '23 08:02 tinhtony2506

I fork the repository and fix this issue. Try https://www.npmjs.com/package/@iftek/react-datetime

yuan9090 avatar Jul 30 '24 10:07 yuan9090