I had the same problem as you (in fact, your question arose during my search on the Internet).
I believe the problem is with the jQueryUI version that you are using vs, which was shown in @ShadowScripter jsFiddle. I ran into this problem using v1.8.17 and v1.8.18, but jsFiddle uses v1.8.16 (which does not reproduce the error). Here's a jsFiddle that reproduces the error using v1.8.18.
So, I distinguished v.18 from v.16, made some code replacement and found the culprit:
In postProcess() , postProcess() is defined as:
v1.8.18:
var self = this; var postProcess = function() { $.datepicker._tidyDialog(inst); self._curInst = null; };
v1.8.16
var postProcess = function() { $.datepicker._tidyDialog(inst); this._curInst = null; };
Therefore, when the label button is pressed when the datepicker open, this in v.16 postProcess() is an HTMLDivElement object, and in v.18, self is a datepicker object. _curInst is a _curInst attribute, so the code in v.16 assigns _curInst wrong object ( HTMLDivElement instead of datepicker ). This error is fixed in v.18, but it introduces this “stuck open” error.
Simple removal self._curInst = null; from v.18 fixes the "stuck" error. I'm not sure if there are any side effects that may occur, but I did not notice any problems during my initial testing, although your results may vary.
source share