Skip to content

Commit c4ae1f9

Browse files
committed
Added enable and disable methods
1 parent 46a26a1 commit c4ae1f9

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/js/bootstrap-datetimepicker.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,15 @@
127127
}
128128
},
129129

130+
disable: function(){
131+
this.$element.find('input').prop('disabled',true);
132+
this._detachDatePickerEvents();
133+
},
134+
enable: function(){
135+
this.$element.find('input').prop('disabled',false);
136+
this._attachDatePickerEvents();
137+
},
138+
130139
hide: function() {
131140
// Ignore event if in the middle of a picker transition
132141
var collapse = this.widget.find('.collapse')

0 commit comments

Comments
 (0)