Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update Android/DatePicker/

Use focus() event on time field and add the blur(). On iPhone, we 
needed the blur() because otherwise the standard form element editor
stayed live after you closed the date picker.
  • Loading branch information...
commit 64da10a85e0fb2c0b07703ec1df97a108140d8b9 1 parent 4f024a1
Robert (Jamie) Munro rjmunro authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 Android/DatePicker/
6 Android/DatePicker/
@@ -21,13 +21,13 @@
}, function(returnDate) {
var newDate = new Date(returnDate);
// This fixes the problem you mention at the bottom of this script with it not working a second/third time around, because it is in focus.
- $('.nativetimepicker').click(function(event) {
+ $('.nativetimepicker').focus(function(event) {
var currentField = $(this);
var time = currentField.val();
var myNewTime = new Date();
@@ -44,6 +44,8 @@
// returnDate is generated by .toLocaleString() in Java so it will be relative to the current time zone
var newDate = new Date(returnDate);
+ currentField.blur();
Please sign in to comment.
Something went wrong with that request. Please try again.