We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7663efd commit ff49804Copy full SHA for ff49804
js/bootstrap-datepicker.js
@@ -40,6 +40,7 @@
40
});
41
this.isInput = this.element.is('input');
42
this.component = this.element.is('.date') ? this.element.find('.add-on') : false;
43
+ this.hasInput = this.component && this.element.find('input').length;
44
if(this.component && this.component.length === 0)
45
this.component = false;
46
@@ -50,7 +51,7 @@
50
51
keydown: $.proxy(this.keydown, this)
52
53
} else {
- if (this.component){
54
+ if (this.component && this.hasInput){
55
// For components that are not readonly, allow keyboard nav
56
this.element.find('input').on({
57
focus: $.proxy(this.show, this),
@@ -125,7 +126,7 @@
125
126
if (e ) {
127
e.preventDefault();
128
}
- if (!this.isInput) {
129
+ if (!this.isInput && this.hasInput) {
130
$(document).on('mousedown', $.proxy(this.hide, this));
131
132
this.element.trigger({
0 commit comments