Skip to content

Commit 13862e3

Browse files
jonssonthacrobat
authored andcommitted
Fixes enableOnReadOnly bug when datepicker is of type component
1 parent b2362c0 commit 13862e3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

js/bootstrap-datepicker.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,8 @@
475475
},
476476

477477
show: function(){
478-
if (this.element.attr('readonly') && this.o.enableOnReadonly === false)
478+
var element = this.component ? this.element.find('input') : this.element;
479+
if (element.attr('readonly') && this.o.enableOnReadonly === false)
479480
return;
480481
if (!this.isInline)
481482
this.picker.appendTo(this.o.container);

0 commit comments

Comments
 (0)