我注意到在Android 4.4(KitKat)浏览器或webview上点击<input type="date" />
字段时弹出的本机日期选择器显示错误日期的问题。请参阅以下示例:
<html>
<head>
<meta name="viewport" content="width=device-width, user-scalable=no">
<title>test</title>
</head>
<body>
<form>
<input type="date" value="2014-10-26" />
</form>
</body>
</html>
渲染得很好(我的本地格式为DD / MM / YYYY):
但是..当你点击该字段打开日期选择器时,它默认为今天的日期!
其他人遇到过这个问题?也许我的value
属性格式不正确? (我已经尝试过其他如DD / MM / YYYY,但那些渲染时带有空白输入字段)
答案 0 :(得分:2)
这似乎是WebViews for Android 4.4.2中的一个特定问题。为这个错误打开了一个问题:
In WebView input type time and date (Nexus 7)
我正在处理同样的问题,所以我希望他们能解决它。
如果我能找到任何解决方法,我会通知你。
谢谢!