We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0318a27 commit d2b7abfCopy full SHA for d2b7abf
1 file changed
ui/widgets/datepicker.js
@@ -2208,7 +2208,12 @@ $.fn.datepicker = function( options ) {
2208
2209
/* Append datepicker main container to body if not exist. */
2210
if ( $( "#" + $.datepicker._mainDivId ).length === 0 ) {
2211
- $( "body" ).append( $.datepicker.dpDiv );
+ if ( options[ "container" ] && $( options[ "container" ] ).length ) {
2212
+ $( options[ "container" ] ).append( $.datepicker.dpDiv );
2213
+ }
2214
+ else {
2215
+ $( "body" ).append( $.datepicker.dpDiv );
2216
2217
}
2218
2219
var otherArgs = Array.prototype.slice.call( arguments, 1 );
0 commit comments