Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update Android/DatePicker/README.md

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/README.md
6 Android/DatePicker/README.md
View
@@ -21,13 +21,13 @@
}, function(returnDate) {
var newDate = new Date(returnDate);
currentField.val(newDate.toString("dd/MMM/yyyy"));
-
+
// 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.
currentField.blur();
});
});
- $('.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.val(newDate.toString("HH:mm"));
+
+ currentField.blur();
});
});
```
Please sign in to comment.
Something went wrong with that request. Please try again.