I have a div defined in my HTML. I would like the datepicker to display when the user mousesover the DIV. When the user selects a date, I will process that internally.
<div id="dp-trigger">Text text</div>
js is like this:
$("#dp-trigger").datepicker({
minDate: -1,
maxDate: "+2M",
onSelect: function (dateText, inst) {
// Do something with the date here.
}
});
$('#dp-trigger).mouseover(function () {
$("#epgGridDate").datepicker("show");
});
I can see the mouseover fire but never see the datepicker. Can this be done?
You’re missing the closing quote which is messing up the javascript.
Otherwise it works fine http://jsfiddle.net/7g658/2/