开发者

Input box time in html ie

I want to get a 'time' input box (that sows the arrows to increase/decrease time). The following code works in chrome/mozilla but开发者_StackOverflow中文版 it doesnt in internet explorer :

    <label for="moduleStart">Hours from:</label>
    <input type="time" name="moduleStart" class="dateFormat"/>

How can this be fixed?


Many element types are new in HTML5 thus not supported by older browsers. You could use a polyfill for non HTML5 browsers.

In this case one like:

http://dl.dropbox.com/u/598365/html5forms/html5forms.html

The objective is to allow authors to use most HTML5 control types and attributes even in browsers which do not yet support all these new HTML5 features. Some of these features are only implemented in the latest version of Opera and partially in Webkit based browsers. To achieve this we need the ability to recognize and handle correct validation for these new types and be able to set:


Internet explorer does not support this input type.


Use HTML5 Modernizer to support HTML5 new input types in browsers that don't support new inputs

From Docs:

These types can enable native datepickers, colorpickers, URL validation, and so on. If a browser doesn’t support a given type, it will be rendered as a text field. Modernizr cannot detect that date inputs create a datepicker, the color input create a colorpicker, and so on—it will detect that the input values are sanitized based on the spec. In the case of WebKit, we have received confirmation that sanitization will not be added without the UI widgets being in place.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜