Building a date picker in ionic (input type=data) we get android 2.3 style datepicker

When we build our app (ionic run). We see that we get the old style datepicker on our “input type=date” HTML elements. How to force that the new datepicker is used (Android 5 style)? sdk version?

Here’s the most I can think based on the context provided.

  1. Is your HTML tag + attribute syntax exactly like this ionic doc specifies?
  2. According to this StackOverflow post, you cannot fire the native datepicker directly from the web (as in via JS, I believe).
  3. If #2 is true, then your only option here is to use this date-picker cordova plugin, which we use for iOS & it works well. If you’re already using NgCordova, here is a link to the angular version.

We ended up using the datepicker plugin right away & didn’t really play too much with HTML5 plugins, so hopefully this will still provide some assistance!

This can be fixed by opening platforms/android/AndroidManifest.xml, and removing this

android:theme="@android:style/Theme.Black.NoTitleBar"

2 Likes

Removing this option worked perfectly! I spent almost an entire afternoon trying to figure out how to display the most recent native date/month picker in my app (running on Android emulator and a real device).

May I suggest you add this is to the date input documentation?