HTML5日期组件无法在iOS 14上与Cordova一起使用的问题 [英] Issue with HTML5 date component not working with Cordova on iOS 14

查看:182
本文介绍了HTML5日期组件无法在iOS 14上与Cordova一起使用的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我们在iOS设备上编辑或设置任何日期或时间字段时,手风琴轮通常会出现在设备屏幕的底部,用户可以使用它来选择日期/时间.
在iOS 14上,此手风琴轮不会出现,并且用户无法更改日期.

解决方案

经过研究,我们发现了三种解决此问题的替代方法:

  1. 使用Cordova日期插件代替HTML5日期组件(请参阅: https://github.com/VitaliiBlagodir/cordova-plugin-datepicker )

  2. 升级到Cordova @ latest,Node @ latest,cordova-ios @ latest

  3. 用Angular Material DatetimePicker替换HTML5日期组件(请参阅: 解决方案

After some research we found three alternatives to fix the issue:

  1. Use Cordova date plugin instead of HTML5 date component (Refer: https://github.com/VitaliiBlagodir/cordova-plugin-datepicker)

  2. Upgrade to Cordova@latest, Node@latest, cordova-ios@latest

  3. Replace HTML5 date component with Angular Material DatetimePicker (Refer: https://www.npmjs.com/package/@angular-material-components/datetime-picker)

  • Option - 1 : did not work, it resulted in a blank screen
  • Option - 2 : was not feasible as we have issue with UIWebView (we are still in migration process to WKWebView)
  • Option -3 : Worked for us as we could replace the HTML5 Date component with Angular material component.

这篇关于HTML5日期组件无法在iOS 14上与Cordova一起使用的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆