kbwood / datepick

jQuery Datepicker Plugin
87 stars 39 forks source link

Keyboard handling bug with multiple datepickers on line 1508, fix included #33

Open whatisaphone opened 8 years ago

whatisaphone commented 8 years ago

Keyboard handling is borked on pages with more than one datepick control. There's a $() call which isn't scoped properly because inst.div is undefined for inline datepickers.

I fixed it by changing the following code on line 1508:

plugin.selectDate(elem,
    $('a.' + inst.options.renderer.highlightedClass, inst.div)[0]);

to this:

plugin.selectDate(elem,
    $('a.' + inst.options.renderer.highlightedClass, inst.elem)[0]);