dmtrKovalenko / material-ui-datetimepicker

[UNMAINTAINED] Wrapper for Material UI Date and Time picker components
https://dmtrkovalenko.github.io/material-ui-datetimepicker/
MIT License
31 stars 9 forks source link

onChange doesn't fire #19

Open jeromevvb opened 7 years ago

jeromevvb commented 7 years ago

Hello guys,

Hope you're doing well. Thanks for this nice component!

I just download this library and started to use but i realized a problem with the onChange method. My method setDatetime is not called :(

<DateTimePicker DatePicker={DatePickerDialog} TimePicker={TimePickerDialog} onChange={this.setDatetime} />

setDatetime = (datetime) => { console.log(datetime); }

Any errors in the console.. What happened?

i looked the material-ui-datepicker code and i saw you tried to fire up the onChange method inside SelectTime function but you the prop "onAccept" on material-ui timepicker but this props doesnt exist right? Please let me know if am doing something wrong! Thaaaaaaank you!!

dmtrKovalenko commented 7 years ago

Oh god) I just little forgot about this project :sorry: I will try to fix that asap

alilland commented 7 years ago

experiencing the same issue :)

dmtrKovalenko commented 7 years ago

That was just strange) I republished previous build, try to install 1.0.4 and let me know if it was not fixed

ThanksAndShareOffice commented 7 years ago

still the same issue =( @dmtrKovalenko

dmtrKovalenko commented 7 years ago

So now I cannot fastly figure out whats going wrong. And I would not have time to look at that deeply near time, so if someone's facing issue and wanna open PR to fix it - you are welcome.

golya commented 6 years ago

@dmtrKovalenko I sent a pull request for this issue. I just removed the setState callback as a hotfix, as it works at selectDate as well. Later we can figure out why the setState callback does not work.

AleVul commented 6 years ago

@golya react version may be the cause of the callback bug. @dmtrKovalenko could you update the npm repository with the latest changes? it is still on the 1.0.4 version and using setState with the callback

dmtrKovalenko commented 6 years ago

I have. 1.0.5 is already available

mkozjak commented 6 years ago

It doesn't fix it for me.

jacobbeasley commented 6 years ago

Seems to be fixed in 1.0.6