diff --git a/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m b/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m index 7439b6b5d4..9c67181b19 100644 --- a/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m +++ b/ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m @@ -63,6 +63,11 @@ - (instancetype)init } datePicker.datePickerMode=UIDatePickerModeDate; +#ifdef __IPHONE_13_4 + if (@available(iOS 13.4, *)) { + datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels; + } +#endif CGRect pickerFrame = CGRectMake(0, 44, [UIScreen mainScreen].bounds.size.width, WXPickerHeight-44); datePicker.backgroundColor = [UIColor whiteColor]; datePicker.frame = pickerFrame; diff --git a/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m b/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m index 4c459ed1c3..c5b57a3206 100644 --- a/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m +++ b/ios/sdk/WeexSDK/Sources/Module/WXPickerModule.m @@ -432,9 +432,11 @@ - (void)createDatePicker:(NSDictionary *)options callback:(WXModuleKeepAliveCall { self.callback = callback; self.datePicker = [[UIDatePicker alloc]init]; +#ifdef __IPHONE_13_4 if (@available(iOS 13.4, *)) { - self.datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels; + self.datePicker.preferredDatePickerStyle = UIDatePickerStyleWheels; } +#endif if (UIDatePickerModeDate == self.datePickerMode) { self.datePicker.datePickerMode = UIDatePickerModeDate; NSString *value = [WXConvert NSString:options[@"value"]];