Bootstrap 4 datapicker.js 不包括在内

Bootstrap 4 datapicker.js not included

我正在为我的新网站使用 Bootstrap V4,因为它处于 Alpha 阶段。

但是我看不到它的构建中有 datepicker.js。

有人知道这是否会包含在 V4 中吗?如果没有谁能推荐一个好的日期选择器?

也许你想试试这个:https://bootstrap-datepicker.readthedocs.org/en/latest/index.html

它是 Bootstrap 风格的灵活日期选择器小部件。

您可以使用它,然后您可以从 bootstrap 添加一个 class 表单。 (版本无关)

<div class="form-group">
 <label >Begin voorverkoop periode</label>
 <input type="date" name="bday" max="3000-12-31" 
        min="1000-01-01" class="form-control">
</div>
<div class="form-group">
 <label >Einde voorverkoop periode</label>
 <input type="date" name="bday" min="1000-01-01"
        max="3000-12-31" class="form-control">
</div>

当我写这个答案时,大多数 bootstrap 日期选择器在包含在 Bootstrap 4 中时相当错误。 在我看来,添加代码最少的解决方案是 jQuery 插件。 我用了这个 https://plugins.jquery.com/datetimepicker/ - you can see its usage here: https://xdsoft.net/jqplugins/datetimepicker/ 它肯定不如整个 BS 界面那么流畅,但它只需要它的 css 和 js 文件以及 jQuery 已经包含在 bootstrap.