我正在使用 bootstrap-datepicker 并遇到问题。
当我点击某一天时,效果很好,但是当我再次点击同一天时,效果很好。选择被取消
The 引导日期选择器演示 http://eternicode.github.io/bootstrap-datepicker/效果很好。
我从上面的链接找到了引导日期选择器的示例。
这是一个已知问题。这是此问题的解决方法。
https://github.com/eternicode/bootstrap-datepicker/issues/816 https://github.com/eternicode/bootstrap-datepicker/issues/816
jsfiddle这个问题:http://jsfiddle.net/antonkruger/fpgseobz/ http://jsfiddle.net/antonkruger/fpgseobz/
一旦我尝试过,我会发布更新。
Update:是的,它有效。
在默认值@第1394行中,添加一个新选项allowDeselection
var defaults = $.fn.datepicker.defaults = {
allowDeselection: false,
...
};
在_toggle_multidate函数@第1015行,将“else if (ix !== -1)”语句修改为:
else if (ix !== -1 && this.o.allowDeselection){
this.dates.remove(ix);
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)