Skip to content
This repository has been archived by the owner on Oct 9, 2018. It is now read-only.

onchange not firing for Date input type #733

Closed
mikefromcanada opened this issue Feb 28, 2013 · 12 comments
Closed

onchange not firing for Date input type #733

mikefromcanada opened this issue Feb 28, 2013 · 12 comments
Labels
Milestone

Comments

@mikefromcanada
Copy link

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
Copy link
Collaborator

tneil commented Feb 28, 2013

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

@mikefromcanada
Copy link
Author

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
Copy link
Collaborator

tneil commented Mar 1, 2013

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

@mikeo007
Copy link

mikeo007 commented Mar 1, 2013

That would be helpful

@tneil
Copy link
Collaborator

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

@mikefromcanada
Copy link
Author

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

@tneil
Copy link
Collaborator

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?

@mikefromcanada
Copy link
Author

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

@tneil
Copy link
Collaborator

tneil commented Mar 1, 2013

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

@mtfranchetto
Copy link

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.

@mikefromcanada
Copy link
Author

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
Copy link
Collaborator

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 as completed Jul 17, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants