VitaliiBlagodir / cordova-plugin-datepicker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DatePicker Not working after iOS14 upgrade

rahulchaube opened this issue · comments

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

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

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

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

works for me

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

@mrstennett
Thanks for your comments
will try this

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

commented

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.

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]; }.