3

Been trying to use the element in my web application, which I have tried in these two ways:

  1. as a standalone html web page, run on Chrome with the user agent set to Android 4.0.2
  2. in an android app via an activity java file and a res/layout file, run through the emulator with Android 4.1.2

Neither of these two ways work, the datepicker does not pop up the native behavior, just a plain text input box shows up. I have a Samsung Galaxy running Android 4.1.2 and the tag does display the native behavior (I just visited a random website -not mine- to test this tag)

Is there any other solution than PhoneGap for this problem? I can't believe it is this difficult! It's just a datepicker for heaven's sake..

justclaire
  • 177
  • 1
  • 2
  • 9
  • Possible duplicate: http://stackoverflow.com/questions/4946919/invoke-native-date-picker-from-web-app-on-ios-android – Josh Mein May 31 '13 at 20:25
  • I have read that answer over and over again. The HTML5 input tag for date does trigger native behavior automatically in ios. But not on Android, *why* ? I just tried on my Android phone running 4.1.2 and the w3schools test example for the 'date' type does trigger the native datepicker. But NOT on the emulator, and NOT on the webkit browser with the user agent set. – justclaire May 31 '13 at 20:28
  • I do not want to use phonegap. I need this to be able to run standalone in the browser without any native dependencies. Short of writing a javascript plugin complete with css, etc when the web app is run on an Android device - it really looks like there is nothing else that can be done to help this problem. – justclaire May 31 '13 at 20:45
  • Instead of writing your own javascript plugin, you could always use the [jQuery UI Datepicker](http://jqueryui.com/datepicker/). – Josh Mein May 31 '13 at 20:50
  • What gets me in my tests on Android 7.1 is that it does show a native date picker, but it's not the cool scrolling one, it's some reduced functionality one where I have to click "+"/"-" to advance each field, or else bring up a keypad entry. – Michael Jan 01 '17 at 21:37

0 Answers0