From f7acfc247dd1ab66e3c8aa4e2c300ccf90cd0c7d Mon Sep 17 00:00:00 2001 From: CROWD STUDIO Date: Mon, 15 Jul 2013 10:48:03 +0200 Subject: [PATCH] Added option hideOnClick --- src/js/bootstrap-datetimepicker.js | 4 ++++ 1 file changed, 4 insertions(+) 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; }