【问题标题】:Choose div where to load Bootstrap Datepicker选择 div 在哪里加载 Bootstrap Datepicker
【发布时间】:2017-04-04 19:06:42
【问题描述】:

我有自己的下拉列表,我想在其中加载 Bootstrap Datepicker,但在文档中我找不到任何相关信息。这是我的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 中。

标签: javascript jquery css datepicker bootstrap-datepicker


【解决方案1】:

添加一个 div,以便您可以加载您的选择器:

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

然后定位新的 div(这样它就不会与引导下拉菜单等冲突):

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

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

【讨论】:

  • 很高兴为您提供帮助!
猜你喜欢
  • 1970-01-01
  • 2014-02-04
  • 1970-01-01
  • 1970-01-01
  • 2013-08-05
  • 1970-01-01
  • 2015-10-24
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多