Using focus or click with a datepicker in IE
I am having an issue with my datepicker in IE8+. This code works in all
other browsers that I have tried, but unfortunately out client only uses
IE8.
What is happening is that when the you click on the field it will bring up
the datepicker. When you try to select a date however, the datepicker just
gets bigger every time you click on it and never actually selects the
date.
If I use click instead of focus it will work, but you need to click into
the field and then out of it again before it will bring up the datepicker.
I would really appreciate any help I could get with this. I have included
my code below.
$(document).ready(function () {
$("body").on("focus", ".datepick", (function () {
$(this).datepick({
dateFormat: "yyyy-mm-dd",
rangeSelect: true
});
}));
});
No comments:
Post a Comment