如何使Bootstrap日期和时间选择器向下打开而不是顶部

时间:2019-11-18 05:29:50

标签: javascript twitter-bootstrap

enter image description here

日期和时间菜单是此列表中的第三个菜单,但它在最上方打开。 如何使它显示在“日期和时间选择器”窗体的底部?

    <link
      rel="stylesheet"
      href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
    />
    <link
      rel="stylesheet"
      href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.css"
    />
    <link rel="stylesheet" href="./css/form.css" />

    <link href="css/Form.css" rel="stylesheet" />
    <script href="js/Form.js" rel="stylesheet"></script>

    <link
      rel="stylesheet"
      href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css"
    />
  </head>

  <body>

    <div class="col-md-4">
      <input
        type="text"
        class="form-control js-datetimepicker"
        placeholder="When do you leave?"
        id="datetimepicker"
        data-toggle="dropdown"
      />
    </div>

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/locale/nl-be.js"></script>
    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.45/js/bootstrap-datetimepicker.min.js"></script>
    <script src="./js/form.js"></script>


```

1 个答案:

答案 0 :(得分:0)

尝试小部件定位:

ngOnInit

文档here