I am using BlackBerry WebWorks SDK 2.3.1.5 to compile a jquery based application and running on Blackberry JDE7.0 simulator
Following is the HTML code for a datetimepicker, datepicker and timepicker
<div data-role="fieldcontain">
<label for="dateandtime">Date and Time </label>
<input type="datetime" id="dateandtime" /> <!-- Use id and name values -->
</div>
<div data-role="fieldcontain">
<label for="date">Date</label>
<input type="date" id="date" /> <!-- Use id and name values -->
</div>
<div data-role="fieldcontain">
<label for="time">Time </label>
<input type="time" id="time" /> <!-- Use id and name values -->
</div>
After running this code, DateTime picker, Date picker and Time picker appear.
when I click on the DateTime picker the native BlackBerry DateTime picker appears and am able to select the Date and Time. Then I click on ok and the value is displayed in the respective field as text.
Now the problem arises when I click on the DateTime picker and after selecting the Date and Time instead of clicking on ok I click on cancel.
If I click on cancel, the picker goes of and then when I click the DateTime picker again it acts as a textfield instead of a DateTime picker, now I click on the Date picker it acts as textfield and I click on Time picker and it acts as textfield, now after scrolling it becomes normal and when I click on DateTime picker the DateTime picker appears, likewise the other pickers also work, but if I click on cancel instead of ok, the same problem happens again.
The problem goes after scrolling, but if I click on cancel the problem comes back.
Please help
It sounds like an OS bug. Unfortunately, I'm not aware of a workaround at this time. You mentioned that scrolling eliminates the issue? What if you had an onfocusout event listener for the date field, and auto scroll the page 1px up? Would that 'force' the problem to go away?