选择 div 加载位置 Bootstrap Datepicker

Choose div where to load Bootstrap Datepicker

我有自己的下拉菜单,我想在其中加载Bootstrap Datepicker and in documentation I cant find anything about that. There's my JSFiddle关于我想要制作的示例

这是我的 HTML 的样子,我想在其中添加日期选择器

<div class="my-example">
  <input id="" placeholder="press to show calendar" class="input">
  <div class="dropdown">
   there is div, where I need to load my datepicker
  </div>
</div>

添加 div 以便您可以加载选择器:

<div class="dropdown">
    <div class="datetimepickerinline">
        there is div, where I need to load my datepicker
    </div>
</div>

然后定位新的 div(这样它就不会与 bootstrap 下拉列表等冲突):

$('.datetimepickerinline').datetimepicker({inline: true});

完成这项工作的关键是将 inline 属性 设置为 true