Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

onchange not firing for Date input type #733

mikefromcanada opened this Issue Feb 28, 2013 · 12 comments


None yet
4 participants

Edit: was just reading through the issues...so the Date type isn't actually part of BBUI? If so, should I be reporting this bug on the main developer forums instead?

This line of code:

<input id="datepicker" type="date" value="" onchange="alert('hello')"/>

Does not product the same results on the simulator as it does in Ripple.
In Ripple, the 'hello' message is shown when the date is changed.
On the simulator, no message is shown.


tneil commented Feb 28, 2013

Is this on BB10? On actual device, or only simulator?

Yes, happening on BB10 using the simulator. I have tried both simulators (fullscreen and qwerty).

The example I'm trying to run is here: https://github.com/mikefromcanada/bbuidatetest
Made it extremely basic to ensure no other code was interfering.


tneil commented Mar 1, 2013

Hmm.. I can try it on a real device to see if there is any difference

mikeo007 commented Mar 1, 2013

That would be helpful


tneil commented Mar 1, 2013

Tried it on an actual device and I don't see it getting triggered there either.. I'll raise it with the webkit team

Thanks Tim. It looks like the control doesn't fire any of the standard DOM events: onchange, onclick, onfocus, etc


tneil commented Mar 1, 2013

Does it make any difference if you have a date value set for the control vs leaving it to show the default?

Nope. In my original code I was actually setting the date value and it didn't work there either.


tneil commented Mar 1, 2013

ok, thanks... I'll get the webkit team looking at this one

I ran into this issue also in one of my apps.
My temporary solution so far is having a timer that runs every n milliseconds and check for changes of the date field.

Been digging around and found the issue reported on the Webworks hub a while ago too: blackberry/WebWorks#122

I was off earlier about onfocus:
onfocus does work as expected.
onblur does not work as expected. It fires at the same time as onfocus.


tneil commented Mar 2, 2013

It's likely getting the onblur at the same time as the onfocus because it is popping up the dialog as soon as you touch it

@tneil tneil closed this Jul 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment