HTML5日期选择器未在Safari上显示 [英] HTML5 date picker doesn't show on Safari

查看:94
本文介绍了HTML5日期选择器未在Safari上显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具有以前使用的jQuery日期选择器,现在我已经将网站上表单中的某些日期字段转换为HTML5日期选择器.

Having previously used jQuery date picker, I have now converted some of the date fields in forms on my website to the HTML5 date picker.

在文档中,它说支持Safari:但是,它目前仅显示一个文本字段(而Chrome和其他浏览器正确显示了日期选择器).

On the documentation, it says Safari is supported: however, it currently shows just a text field (whereas Chrome and other browsers show the date picker correctly).

echo "<input type='date' name='Date' min='$todaymin'>";

(没有min属性的情况相同)

(the same applied without the min attribute)

这是我的代码行-我做错什么了吗?或者我只是阅读了错误的文档,而Safari不支持?

This is my code line - am I doing something wrong or am I just reading the documentation wrong and it is NOT supported in Safari?

谢谢!

推荐答案

Safari的台式机版本不包含本机datepicker(尽管适用于iOS).顺便说一句,IE也没有.这非常令人沮丧,因为如果这样做的话,它可以节省很多时间.

Safari does not include a native datepicker for its desktop version (although it does for iOS). Incidentally, neither does IE. It's very frustrating as it could save developers a lot of time if they did.

这是跟踪其支持的有用链接: http://caniuse.com/#feat= input-datetime

This is a useful link for tracking support for it: http://caniuse.com/#feat=input-datetime

这篇关于HTML5日期选择器未在Safari上显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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