VitaliiBlagodir / cordova-plugin-datepicker

MIT License
318 stars 350 forks source link

It looks wrong on Android 7.1 #221

Open escobar5 opened 7 years ago

escobar5 commented 7 years ago

It has a strange space at the right.

screenshot_20170206-155720

tavosansal commented 7 years ago

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

uzumakinaruto123 commented 7 years ago

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.

tavosansal commented 7 years ago

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

uzumakinaruto123 commented 7 years ago

@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.

escobar5 commented 7 years ago

@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.

tavosansal commented 7 years ago

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

uzumakinaruto123 commented 7 years ago

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

escobar5 commented 7 years ago

@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.

ChadHelbling commented 7 years ago

@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.

uzumakinaruto123 commented 7 years ago

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.

allanpoppe commented 6 years ago

Any news on this?

machty commented 4 years ago

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 commented 4 years ago

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

VaultDeveloper commented 3 years ago

The fix #244 is from 2017 but never merge.