bootstrap datepicker选项似乎不起作用(按生命周期显示的datepicker) [英] bootstrap datepicker option doesn't seem work (datepicker by vitalets)

查看:414
本文介绍了bootstrap datepicker选项似乎不起作用(按生命周期显示的datepicker)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我包括了所有内容,但似乎无法使用这些选项,没有新手的例子会很痛苦..帮助..

I included everything but it doesn't seem work with the options, no example for a newbiew is a pain.. help..

html

<input type="text" class="form-control  datepicker" id="datepicker" data-date-format="dd/mm/yyyy" />

js

$('#datepicker').datepicker({
        autoclose: true,
        todayBtn: true,
        todayHighlight: true
});

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

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

推荐答案

您的代码很好,

选中此> JSFiddle ,当我选择时日期选择器将关闭日期.

check this JSFiddle the datepicker is getting closed when I select a date.

autoclose: true  //this will work with vitalets

我想以下是可能的原因:

I guess the following is the possible reason:

1)可能输入了错误的 bootstrap.datepicker.js

1) Might given wrong bootstrap.datepicker.js

<script src="http://vitalets.github.io/bootstrap-datepicker/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>

确保您的路径正确

这篇关于bootstrap datepicker选项似乎不起作用(按生命周期显示的datepicker)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆