Google Chrome输入类型=“日期" [英] Google Chrome input type="date"
问题描述
我几乎不了解Web编程,但是我受命解决公司网站上的问题.显然,我在使用type ="date"的旧版网站上使用HTML5的浏览器存在问题,我需要找到解决方法.
I have almost no knowledge of web programming, but I have been tasked to solve something on my company's website. Apparently, I have an issue with browsers using HTML5 on a legacy site using type="date" and I need to find a way around it.
我的网站上有很多用户必须输入的日期字段,例如:
My site has a lot of date fields that the user must input like such:
<input type="date" name="DateStart" size="15" value="8/30/2011">
在我们当前使用的所有浏览器(Chrome浏览器除外)中,这都可以正常工作.Chrome浏览器是唯一提供滚动按钮以滚动显示日期的浏览器.我在此后端看到的是尝试执行此操作:
In every browser we currently use except Chrome, this works just fine. Chrome is the only browser that supplies rolling buttons to scroll through the date. What I see on the back end of this is an attempt to do this:
FormatDateTime(DateStart, 2)
我收到无效的日期错误,这意味着我们无法使用Chrome填写此表单.有办法解决这个问题吗?
I get an invalid date error which means that we cannot use Chrome to fill out this form. Is there a way around this problem?
推荐答案
Chrome的日期输入没有问题,的输入上显示带有日历的下拉列表.
Chrome does not have issues with date-inputs, you are using the wrong date-format, sir. Chrome isn't the only browser until today which has support for the new HTML5 inputs. Opera for example displays a dropdown with a calendar on inputs with type="date"
.
HTML5日期输入中也不存在大小属性.
Also the size-attribute does not exist on HTML5-date-inputs.
这篇关于Google Chrome输入类型=“日期"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!