Closing the datepicker via the provided button does not work in Chrome when the button contains other non-text elements.
|Reported by:||N3RD||Owned by:|
If other non-text elements are injected into the provided button using the buttonText option, clicking the button while the datepicker is open does a couple weird things. First, it closes as expected, but then reopens immediately after. Second, it loses the document.mousedown handler that cause it to close when something other than the datepicker is clicked on. Although not an issue per se, in Firefox there is a slight pause before the datepicker closes (at least it closes).
My solution was to change the document.mousedown handler to a document.click handler. But this broke the next and previous anchor buttons. My solution to fix that was to put a stopPropagation call inside the click handlers for those anchors, but I guess that's not the right way to do it.
This issue is kind of important because it limits the ability to style the button.