diff --git a/src/js/bootstrap-datetimepicker.js b/src/js/bootstrap-datetimepicker.js index 591bf42a5..2acf76321 100644 --- a/src/js/bootstrap-datetimepicker.js +++ b/src/js/bootstrap-datetimepicker.js @@ -118,6 +118,7 @@ this.fillSeconds(); this.update(); this.showMode(); + this.hideOnClick = (typeof options.hideOnClick != 'undefined') ? options.hideOnClick : false; this._attachDatePickerEvents(); }, @@ -630,6 +631,9 @@ this.fillDate(); this.set(); this.notifyChange(); + if (this.hideOnClick) { + this.hide(); + } } break; }