我使用 Bootstrap V4为我的新网站,看到它是在阿尔法。
但是我看不出它的构建中有 datepicker.js。
是否有人知道这将包括在 V4? 如果没有人可以推荐一个好的日期采集器?
也许你想试试这个: https://bootstrap-datepicker.readthedocs.org/en/latest/index.html
It's a flexible datepicker widget in the Bootstrap style.
您可以使用这个,然后您可以从引导程序添加一个 class表单。 (不管是哪个版本)
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>
当我写这个答案的时候,大多数引导日期拾取程序在引导4中都有很多错误。 在我看来,增加代码最少的解决方案是 jQuery 插件。 我用了这个 https://plugins.jquery.com/datetimepicker/-你可以在这里看到它的用法: https://xdsoft.net/jqplugins/datetimepicker/ 它当然不像整个 BS 界面那样流畅,但是它只需要 css 和 js 文件以及已经包含在 bootstrap 中的 jQuery。