change event is not fired for input type=date
Hello,
It seems like change event is not fired for input type=date in mobile Firefox on Android.
Please try the following jsFiddle code for example http://jsfiddle.net/adaniliuk/srt6mp0p/
May be I'm doing something wrong? But the above code works well in Chrome, Safari and desktop Firefox but not in mobile Firefox - tested in Firefox v.37.0.1 on Android 5.1
Just in case vanilla JavaScript works well in this case http://jsfiddle.net/adaniliuk/voueyub9/
Thank you in advance, Andrei
cc @syranide @salier - do we need to special case this & listen to a different event there?
cc @spicyj I think?
I'm using react 0.13.1, and I encounter the same issue, but it's on Android 4.1.2
so I have to use the onBlur as a fallback in case the onChange callback not executed
^ Also broken on Chrome per #4733.
I don't think #4733 is the same issue? or if it is then this probably isn't a bug. I think this is the intended behavior. If the picker is missing some part of the date, its not possible for it to have a value since its not a valid date. The issue is that as long as any part of the picker is empty it won't fire a change (or input). Once all parts any filled in any change to a given part will fire a change.
If you wanted to "correct" this choice tho I am not sure how'd you do it, since the input gives no feedback in vanilla js either when this happens (clicked with a mouse that is).
Hi there, I'm also taken to this case: https://jsfiddle.net/02nxr8bc/1/ Would be awesome if you still can fix it.
Thanks in advance. Felix
Is there any ETA for this? It completely breaks controlled date inputs for Firefox Android.
@AdamBoxall You're welcomed to submit a pull request.
I dug into this just now. I can't reproduce the issue on React 15.2.1. I'm going to trace back and see when it was fixed.
Yikes. Wrong. This is broken on React 15.2.1. It only appears to have been fixed on master (16.0.0-alpha).
@nhunzaker Mind bisecting to figure out which commit fixes it and needs to be cherry-picked?
@spicyj doing it now :)
Sorry for the double post..
Looks like: 045f1a791c6e17253e9d927ffca70ae5d00b4fe5
Awesome work, @jquense.
If it helps, here's my test script to reproduce:
https://gist.github.com/nhunzaker/428f9f1283e790b152254510dd92afbe
I just ran it locally on my Android phone from examples/date/index.html.
@spicyj I went ahead and put in the legwork to backport this in the following PR: https://github.com/facebook/react/pull/7303. Assuming this is viable, I wouldn't mind backporting it to 0.14.x and 0.13.x if possible (or interest)
Is there any workaround until react 16.0.0 is released?
Tried 16.0.0-alpha.3, but onChange event wasn't fired on type date
I'm fairly certain we've confirmed these issues are fixed yes?
Closed, but still NOT working
Note you might be getting this because the browser doesn't emit any events for invalid dates: https://github.com/facebook/react/issues/12056#issuecomment-359109709