When I make an input tag for a date in IE using jquery mobile, there isn't a calendar popup that shows like in chrome. Is there a plugin that I could download that would create a calendar popup for IE?
Here is my HTML I'm using:
<input id="EndDate" name="EndDate" type="date" value="">
And a built-in datepicker isn't available in all versions of IE that I've tested (IE 8, 9, 10, etc.)
<input type="date">
is not supported as a native feature by any version of IE.
The best solution is to use a "Polyfill" script. Polyfills are small scripts written to add support for a feature that may be missing in certain browsers. Typically they allow the site author to write their normal standard HTML or CSS code, and the polyfill script does the work behind the scenes to make the feature work.
The Modernizr project has a Wiki page that lists a whole stack of polyfill scripts. This page includes at least two scripts that polyfill the <input type='date'>
feature. I suggest trying out these scripts first. (there may be others on the web, but if Modernizr are recommending them, then they're probably the best out there)
Talking of Modernizr, you may want to use this script as well, as its job is to help you determine what features the browser supports and thus whether you need to load a polyfill script.
The Modernizr site has good instructions on how to do browser feature detection and how to load polyfill scripts using Modernizr, so I won't repeat it here.
Alternatively if you don't want to use Modernizr, you could write your own feature detection script -- it's pretty easy. Something like this should do the trick:
function browserSupportsDateInput() {
var i = document.createElement("input");
i.setAttribute("type", "date");
return i.type !== "text";
}
and then you'd use it like this:
if(!browserSupportsDateInput()) {
//not supported, so run the polyfill script instead.
}
hope that helps.