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

It looks wrong on Android 7.1

Open escobar5 opened this issue 8 years ago • 14 comments

It has a strange space at the right.

screenshot_20170206-155720

escobar5 avatar Feb 06 '17 21:02 escobar5

I can also confirm this. Extra spacing on the right side.

tavosansal avatar Feb 22 '17 21:02 tavosansal

Its not the plugin issue ! Its according to density pixels of a device. Its a native datepicker , and same happens with it. You can check by changing pixel density on your device.

uzumakinaruto123 avatar Feb 23 '17 08:02 uzumakinaruto123

@uzumakinaruto123 Thanks for your reply. Total noob question but how does one go about changing pixel density?

tavosansal avatar Feb 23 '17 15:02 tavosansal

@tavosansal you can try this adb command : -adb shell wm density 400 && adb reboot you can remove && adb reboot.

But , I suggest you don't do it. I keep mine at 400(one plus 3) because I like everything small.

If you want to try then , please note your default density before doing. You will have to try different values to make date picker look correct.

you can try few apps here :- https://play.google.com/store/search?q=screen%20density&c=apps

some apps require root. Anyways , this is getting off topic for the plugin.

uzumakinaruto123 avatar Feb 23 '17 15:02 uzumakinaruto123

@uzumakinaruto123 if it was a problem with the device shouldn't it display wrong in every app? for me it only displays like that on my ionic application, in every other application it is displaying right, also, if i put a <input type="date"> in my ionic app, it is showing fine, the only way I see it like this is when I use this plugin.

escobar5 avatar Feb 23 '17 16:02 escobar5

I agree with @escobar5 ... time picker provided by this plugin looks perfectly fine. The date picker doesn't.

tavosansal avatar Feb 23 '17 16:02 tavosansal

Most of of the apps adjust to the changed resolution. If you have any other app using this same date picker , do check in it. Its hard to find some native app with this datepicker. But , check it if you can. What I am saying is this plugin is just cordova wrapper for native datepicker. For me , on my device if I change dpi to 480 (device deault) then datepicker looks perfect. Now , at 400 it does not. Even I am using it in Ionic. plugin just calls the native java datepicker and gets result back. maybe , I missed something. @VitaliiBlagodir can confirm

uzumakinaruto123 avatar Feb 23 '17 16:02 uzumakinaruto123

@uzumakinaruto123 I have the default dpi for my device, also tried with a couple of emulators, same result, <input type="date"> shows the same datepicker, and it shows fine.

escobar5 avatar Feb 23 '17 16:02 escobar5

@uzumakinaruto123 I don't think we should be messing around with a users native pixel density. The pixel densities are different because android supports a wide variety of screen sizes and resolutions. I'm sure the native datepicker is designed to handle that, however it seems there may be some extra work needed to get the plugin to match that functionality.

ChadHelbling avatar Feb 23 '17 16:02 ChadHelbling

I never tried <input type="date"> . I will try this and check if it opens the same picker and if it looks perfect.

Update :- @escobar5 I tried it. and it does look perfect. layout is bit different and seems to be of fixed width on every device. but I never knew html input could open it. Maybe plugin will need some extra work.

uzumakinaruto123 avatar Feb 23 '17 16:02 uzumakinaruto123

Any news on this?

allanpoppe avatar Sep 10 '18 21:09 allanpoppe

This is still an issue. Running an Emulator on API 28, Android 9, and this is what I'm seeing in my app with cordova-plugin-datepicker:

image

And this is what I see when I go into system settings:

image

machty avatar Dec 25 '19 12:12 machty

This seems to fix: https://github.com/VitaliiBlagodir/cordova-plugin-datepicker/pull/244

machty avatar Dec 25 '19 12:12 machty

The fix #244 is from 2017 but never merge.

VaultDeveloper avatar Apr 12 '21 15:04 VaultDeveloper