Skip to content
Permalink
Browse files

Datepicker: Fixed #4453 UI Datepicker inside UI Dialog Issue

  • Loading branch information
btburnett3 committed Feb 1, 2010
1 parent a4daa10 commit 5b61537e6e759cacc4295887200db6ac07086f54
Showing with 8 additions and 1 deletion.
  1. +7 −0 ui/jquery.ui.datepicker.js
  2. +1 −1 ui/jquery.ui.dialog.js
@@ -651,6 +651,10 @@ $.extend(Datepicker.prototype, {
if (inst.input.is(':visible') && !inst.input.is(':disabled'))
inst.input[0].focus();
$.datepicker._curInst = inst;

// find the dialog wrapping the input, if any, and bind to close event
inst._dialog = $(input).closest('.ui-dialog-content')
.bind('dialogclose.datepicker', function() { $.datepicker._hideDatepicker(input); });
}
},

@@ -775,6 +779,9 @@ $.extend(Datepicker.prototype, {
}
}
this._inDialog = false;

if (inst._dialog)
inst._dialog.unbind('dialogclose.datepicker');
}
},

@@ -601,7 +601,7 @@ $.extend($.ui.dialog.overlay, {
if ($.ui.dialog.overlay.instances.length) {
$(document).bind($.ui.dialog.overlay.events, function(event) {
// stop events if the z-index of the target is <= the z-index of the overlay
return ($(event.target).zIndex() > $.ui.dialog.overlay.maxZ);
return ($(event.target).zIndex() >= $.ui.dialog.overlay.maxZ);
});
}
}, 1);

0 comments on commit 5b61537

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