Skip to content
Browse files

Datepicker: show inline datepicker setting explicit display:block ins…

…tead of using .show() in case it is disconnected. Fixed #7552 - A Datepicker created on a detached div has zero height
  • Loading branch information
rdworth committed Jul 19, 2011
1 parent 416bc6f commit b8af0d1f7505dd5e56319a11bbd14f1e381b36b9
Showing with 26 additions and 1 deletion.
  1. +23 −0 tests/visual/datepicker/datepicker_ticket_7552.html
  2. +3 −1 ui/jquery.ui.datepicker.js
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<title>Datepicker Visual Test : Datepicker ticket #7552</title>
<link rel="stylesheet" href="../visual.css" type="text/css" />
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css" type="text/css">
<script type="text/javascript" src="../../../jquery-1.5.1.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.core.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.widget.js"></script>
<script type="text/javascript" src="../../../ui/jquery.ui.datepicker.js"></script>
<script type="text/javascript">
$(function() {

<h1 class="ui-widget-header"><a href="">#7552 - A Datepicker created on a detached div has zero height</a></h1>

@@ -285,7 +285,9 @@ $.extend(Datepicker.prototype, {
if( inst.settings.disabled ) {
this._disableDatepicker( target );
// Set display:block in place of which won't work on disconnected elements
// - A Datepicker created on a detached div has zero height
inst.dpDiv.css( "display", "block" );

/* Pop-up the date picker in a "dialog" box.

0 comments on commit b8af0d1

Please sign in to comment.
You can’t perform that action at this time.