cordova-plugin-datepicker icon indicating copy to clipboard operation
cordova-plugin-datepicker copied to clipboard

DatePickerDialog Holo styling failed on Android 7 Nougat

Open marcoramires opened this issue 7 years ago • 2 comments

It's a know Nougat issue: https://stackoverflow.com/questions/39873076/datepickerdialog-holo-styling-failed-on-android-7-nougat

"... It turns out that Android 7.0 shipped with a bug: trying to use the Holo theme on this platform instead falls back to using a broken Material theme for the DatePickerDialog. See these two bug reports:"

https://issuetracker.google.com/issues/37120178 https://issuetracker.google.com/issues/37119315

Workaround by Jeff Lockhart: https://gist.github.com/jeffdgr8/6bc5f990bf0c13a7334ce385d482af9f

I will try to work on a fix and submit a pull request.

Cheers

marcoramires avatar Jun 14 '17 06:06 marcoramires

Were you already able to fix this? I didn't find it a pullrequest or a fix on your branch.

lukeisontheroad avatar Jun 27 '17 20:06 lukeisontheroad

Hi @lukeisontheroad,

I didn't have the time to work on this yet.

As this bug is being fixed in the later version of Android (7.1.1) we decided to add a conditional statement for v7.0 users and use the default calendar instead.

e.g.

// HOLO theme calendar bug in Android 7.0
if(device.platform == 'Android' && device.version == '7.0') {
  var options = {
    androidTheme: 0
  };
}

It will solve our problems for now.

Cheers, Marco

marcoramires avatar Jul 07 '17 04:07 marcoramires