2

The HTML5 date picker is only showing on mobile, it doesn't do anything on the desktop site. I am using the below html:

<input type="date" name="req_dobirth" tabindex="13" id="req_dobirth" value="<%=request("req_dobirth")%>" />

The same field on the mobile form is:

<input type="date" name="req_dobirth" tabindex="17" style="width: 92%;" id="req_dobirth" value="<%=request("req_dobirth")%>" />

(only difference being the width)

Any ideas?

JFar_13
  • 91
  • 1
  • 4
  • 12

2 Answers2

0

Because it has support on IOS/Safari and Chrome/Opera on Desktop.

http://caniuse.com/#feat=input-datetime

Kugel
  • 19,354
  • 16
  • 71
  • 103
mikach
  • 2,427
  • 2
  • 14
  • 15
  • Yeah, had jQuery UI datepicker but diue to my numerous jquery scripts, it is conflicting so looking for an easier option. – JFar_13 Jul 29 '13 at 13:14
0

Most desktop browsers still do not support the date input type.

You can find a full browser compatibility chart here: http://caniuse.com/input-datetime

I suggest using a polyfill of some kind (maybe the jQuery datepicker control for example, or see the modernizr polyfill list for more options) as a fall-back for browsers that do not support it.

See this question for more about how to detect browser support: How can I tell if a browser supports <input type='date'>

Community
  • 1
  • 1
Spudley
  • 166,037
  • 39
  • 233
  • 307