Skip to content

Commit 108d27c

Browse files
authored
Merge pull request Eonasdan#1667 from NickBeeuwsaert/development
Make datepickers not share options
2 parents 044aa9c + 77953a3 commit 108d27c

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/js/bootstrap-datetimepicker.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2411,11 +2411,12 @@
24112411

24122412
if (typeof options === 'object') {
24132413
return this.each(function () {
2414-
var $this = $(this);
2414+
var $this = $(this),
2415+
_options;
24152416
if (!$this.data('DateTimePicker')) {
24162417
// create a private copy of the defaults object
2417-
options = $.extend(true, {}, $.fn.datetimepicker.defaults, options);
2418-
$this.data('DateTimePicker', dateTimePicker($this, options));
2418+
_options = $.extend(true, {}, $.fn.datetimepicker.defaults, options);
2419+
$this.data('DateTimePicker', dateTimePicker($this, _options));
24192420
}
24202421
});
24212422
} else if (typeof options === 'string') {

0 commit comments

Comments
 (0)