From 2c83d48cc786a4be97a20064863d7baadd44b47b Mon Sep 17 00:00:00 2001 From: William Duffy Date: Sat, 15 Jun 2013 18:37:44 +0100 Subject: [PATCH] Allow auto closing of datepicker when a date is chosen --- src/js/bootstrap-datetimepicker.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/bootstrap-datetimepicker.js b/src/js/bootstrap-datetimepicker.js index 591bf42a5..496f03bb1 100644 --- a/src/js/bootstrap-datetimepicker.js +++ b/src/js/bootstrap-datetimepicker.js @@ -630,6 +630,9 @@ this.fillDate(); this.set(); this.notifyChange(); + if (this.options.autoClose) { + this.hide(); + } } break; } @@ -1087,7 +1090,8 @@ }); }; - $.fn.datetimepicker.defaults = { +$.fn.datetimepicker.defaults = { + autoClose: false, maskInput: false, pickDate: true, pickTime: true,