bootstrap datepicker 选项似乎不起作用(vitalets 的 datepicker)

Ric*_*oek 1 jquery datepicker twitter-bootstrap

我包含了所有内容,但它似乎不适用于这些选项,对于新手来说没有一个例子是痛苦的..帮助..

html

<input type="text" class="form-control  datepicker" id="datepicker" data-date-format="dd/mm/yyyy" />
Run Code Online (Sandbox Code Playgroud)

js

$('#datepicker').datepicker({
        autoclose: true,
        todayBtn: true,
        todayHighlight: true
});
Run Code Online (Sandbox Code Playgroud)

github 参考:https : //github.com/vitalets/bootstrap-datepicker#autoclose

小智 6

todayBtn: true directs the button to only bring today into view, not select it. If you want the button to actually change the date selected, use:

todayBtn: "linked"
Run Code Online (Sandbox Code Playgroud)

See it from: https://github.com/uxsolutions/bootstrap-datepicker/issues/314