DatePicker and ui-state-hover

DatePicker and ui-state-hover

Hello,

Seems that someone already reported on this a few years ago but the problem, if it is a problem, remains.  To recreate the problem, create a DatePicker.  I use the following code:

  1. var now = new Date();
        $(".datepicker").datepicker({
            defaultDate: now,
            maxDate: now
        });



Then in the widget go back one month by clicking the left arrow in the top left corner and select (click) any day.  Then go forward to the original month by clicking the right arrow in the top right corner making sure not to move the mouse into the calendar afterwards.  Checking the DOM in Firebug reveals that today's anchor tag has the class ui-state-hover attached to it.  This is due to line 7517 in jquery-ui-1.10.1.custom.js in the function _updateDatepicker:

  1. inst.dpDiv.find("." + this._dayOverClass + " a").mouseover();

I do not quite understand the purpose behind _dayOverClass but this is the line that adds the ui-state-hover class to the anchor tag.  Obviously, the mouse is not over the day (if you recreated the problem above correctly) so the ui-state-hover class should not be there.  The problem corrects itself after the mouse moves into the calendar area over some other day.  I believe this is a bug.  I am assuming that the _dayOverClass keeps track of the table cell over which the mouse is but I am not sure even after reading the code and the comments in the code.  Perhaps someone can shed some light on this issue.

Sincerely,
Pawel