Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
70
rated 0 times [  77] [ 7]  / answers: 1 / hits: 8282  / 11 Years ago, wed, january 8, 2014, 12:00:00

I´m writing an application that deals massively with dates.



So, I´m using the new HTML5 input types for datetime, date, month and week...



Surprisingly I found out this is not working on IE10. I´m using IE version 10.0.9200.



To check this out, please open that page: Test Link



My typical input type looks like (I´m using Tweeter Bootstrap as well):



            <div class=col-md-8>
<div class=form-group>
<label for=dateTime>Período do Relatório</label>
<input type=date class=form-control id=reportDate>
</div>
<script>
var isoString = toLocalIsoString(new Date());
document.getElementById(reportDate).value = isoString.substr(0, 10);
</script>
</div>


And them later I chage the type I need, like:



            document.getElementById('reportDate').type = 'week';


or



            document.getElementById('reportDate').type = 'month';


In Chrome it works real nice, opening choose windows for the user to choose the month on week, but in IE I get the following error (translated):



0x80070057 - Javascript execution time error. Invalid argument.


So, according to this scenario:



a) I´m doing something wrong here ?



b) If not, how can I support these HTML5 in IE10.



c) If in fact this will not work in IE10, what are the alternatives to have a Chrome like behaviour (popup a small windows so that the user chooses the month, date, week, etc.).



Thanks in advance for any help.


More From » jquery

 Answers
1

According to Can I Use the date-time input types are not supported by IE. A good alternative would be jQuery UI.


[#48904] Tuesday, January 7, 2014, 11 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lindsay

Total Points: 402
Total Questions: 109
Total Answers: 109

Location: Tuvalu
Member since Sat, Feb 11, 2023
1 Year ago
;