Skip to content
Browse files

Datepicker: added a condition to reinitialize datepicker if there is …

…no mainDiv on the page. Fixed #5679 - Datepicker should reinitialize if dpDiv is removed
1 parent 74a3f2c commit c0bd1c3ff06e88029dec00905d9385716a1a6378 Roman Salnikov committed Nov 29, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.datepicker.js
View
2 ui/jquery.ui.datepicker.js
@@ -1792,7 +1792,7 @@ $.fn.datepicker = function(options){
}
/* Initialise the date picker. */
- if (!$.datepicker.initialized) {
+ if (!$.datepicker.initialized || $($.datepicker._mainDivId).length == 0) {
$(document).mousedown($.datepicker._checkExternalClick).
find('body').append($.datepicker.dpDiv);
$.datepicker.initialized = true;

0 comments on commit c0bd1c3

Please sign in to comment.
Something went wrong with that request. Please try again.