We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8311f9 commit f48de0aCopy full SHA for f48de0a
ui/jquery.ui.datepicker.js
@@ -1697,7 +1697,7 @@ function isArray(a) {
1697
$.fn.datepicker = function(options){
1698
1699
/* Initialise the date picker. */
1700
- if (!$.datepicker.initialized) {
+ if (!$.datepicker.initialized || $($.datepicker._mainDivId).length == 0) {
1701
$(document).mousedown($.datepicker._checkExternalClick).
1702
find('body').append($.datepicker.dpDiv);
1703
$.datepicker.initialized = true;
0 commit comments