VitaliiBlagodir / cordova-plugin-datepicker

MIT License
319 stars 350 forks source link

DatePicker Not working after iOS14 upgrade #292

Open rahulchaube opened 3 years ago

rahulchaube commented 3 years ago

After ios14 upgrade the datepicker is no longer working. Looks like iOS did something to make it's default datePicker supersede the existing datepicker in the application. Attaching screenshot. Can someone please help on this.

Regards, Rahul[

DatePickerBroken

](url)

mrstennett commented 3 years ago

@rahulchaube did you manage to find a solution? I'm experiencing the same thing

mrstennett commented 3 years ago

Just found a fork that's solved the issue: https://github.com/AppsGanin/cordova-plugin-datepicker

scaperow commented 3 years ago

Just found a fork that's solved the issue: https://github.com/AppsGanin/cordova-plugin-datepicker

Just found a fork that's solved the issue: https://github.com/AppsGanin/cordova-plugin-datepicker

works for me

Adichilla commented 3 years ago

@mrstennett Can you elaborate on how to apply this fork? I tried to install this via package JSON "cordova-plugin-datepicker": "git+https://github.com/AppsGanin/cordova-plugin-datepicker.git", But it is not working for me My ios version is 5.0.1

mrstennett commented 3 years ago

@mrstennett Can you elaborate on how to apply this fork? I tried to install this via package JSON "cordova-plugin-datepicker": "git+https://github.com/AppsGanin/cordova-plugin-datepicker.git", But it is not working for me My ios version is 5.0.1

If I remember correctly, I think I did ionic cordova plugin add https://github.com/AppsGanin/cordova-plugin-datepicker.git

You might also need to remove the original first.

Adichilla commented 3 years ago

@mrstennett Thanks for your comments will try this

rajeshrapaka commented 3 years ago

@mrstennett Thanks for your comments will try this

Hi my ionic project is a capacitor project. So I installed the fork using npm i https://github.com/AppsGanin/cordova-plugin-datepicker.git. However I still see the cancel and done box with date buttons inside it. When I click on the date inside this box it would then open the ios 14 date picker. It would not open the date picker directly when I click on the ion-button from where I called the datepicker.show(). My package.json dependencies shows the related packages as follows:
"cordova-plugin-datepicker": "git+https://github.com/AppsGanin/cordova-plugin-datepicker.git", "@ionic-native/date-picker": "^5.31.1",

I have uninstalled, removed and added several times. But still failed to make it work. Am I doing something wrong? Any help would be appreciated.

irene-pc commented 2 years ago

Hi!

I am developing an app with IONIC V3 and Cordova. I am using cordova-plugin-datepicker and everything go ok until I deploy my app with SDK iOS14. Since there date picker is different. How can I solve it?

Thank you very much.

workingattulipsatgithub commented 2 years ago

After ios14 upgrade the datepicker is no longer working. Looks like iOS did something to make it's default datePicker supersede the existing datepicker in the application. Attaching screenshot. Can someone please help on this.

Regards, Rahul DatePickerBroken

You need to add if (@available(iOS 13, *)) { UIDatePicker *picker = [UIDatePicker appearance]; picker.preferredDatePickerStyle = UIDatePickerStyleWheels; } to AppDelegate.m.

Put this between - (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions { and return [super application:application didFinishLaunchingWithOptions:launchOptions]; }.