diff --git a/tests/visual/datepicker/datepicker_ticket_7552.html b/tests/visual/datepicker/datepicker_ticket_7552.html new file mode 100644 index 000000000..a78a84818 --- /dev/null +++ b/tests/visual/datepicker/datepicker_ticket_7552.html @@ -0,0 +1,23 @@ + + + + + Datepicker Visual Test : Datepicker ticket #7552 + + + + + + + + + + +

#7552 - A Datepicker created on a detached div has zero height

+ + + diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index 19696236c..921f48760 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -285,7 +285,9 @@ $.extend(Datepicker.prototype, { if( inst.settings.disabled ) { this._disableDatepicker( target ); } - inst.dpDiv.show(); + // Set display:block in place of inst.dpDiv.show() which won't work on disconnected elements + // http://bugs.jqueryui.com/ticket/7552 - A Datepicker created on a detached div has zero height + inst.dpDiv.css( "display", "block" ); }, /* Pop-up the date picker in a "dialog" box.