Skip to content

Commit

Permalink
Add configuration to append to element
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Lin committed Jul 5, 2018
1 parent b1178b4 commit eac3097
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/date-picker-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ function defaults() {

inRange: function () {
return true;
}
},

appendTo: document.body,
};
}

Expand Down
2 changes: 1 addition & 1 deletion src/mode/base-mode.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default function BaseMode(input, emit, opts) {
containerHTML: '<div class="dp"></div>',

attachToDom: function () {
document.body.appendChild(dp.el);
opts.appendTo.appendChild(dp.el);
},

updateInput: function (selectedDate) {
Expand Down

0 comments on commit eac3097

Please sign in to comment.