arqex / react-datetime

A lightweight but complete datetime picker react component.
1.99k stars 873 forks source link

onClose returns wrong value #814

Open ALEUT opened 2 years ago

ALEUT commented 2 years ago

I'm Submitting a ...

[x] Bug report
[ ] Feature request
[ ] Support request

Steps to Reproduce

1) Select any date 2) Open datepicker and select another time 3) onClose returns previous time

Expected Results

onClose returns the same as value

Actual Results

onClose returns wrong time

Minimal Reproduction of the Problem

https://codesandbox.io/s/fast-voice-92g2i?file=/src/App.js

Other Information (e.g. stacktraces, related issues, suggestions how to fix)

Granaat commented 1 year ago

This still appears to be the case. Any progress in fixing this bug? As there's a lot of overhead using the "onChange" callback instead of the "onClose"