Skip to content

Commit

Permalink
Merge pull request #1117 from mfunkie/master
Browse files Browse the repository at this point in the history
Fix for #1112, assigning plugin to a local variable
  • Loading branch information
acrobat committed Jan 16, 2015
2 parents 77b9adb + f5c9849 commit 5f2863e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions js/bootstrap-datepicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -1352,8 +1352,7 @@
});
delete options.inputs;

$(this.inputs)
.datepicker(options)
datepickerPlugin.call($(this.inputs), options)
.bind('changeDate', $.proxy(this.dateUpdated, this));

this.pickers = $.map(this.inputs, function(i){
Expand Down Expand Up @@ -1456,7 +1455,7 @@
}

var old = $.fn.datepicker;
$.fn.datepicker = function(option){
var datepickerPlugin = function(option){
var args = Array.apply(null, arguments);
args.shift();
var internal_return;
Expand Down Expand Up @@ -1492,6 +1491,7 @@
else
return this;
};
$.fn.datepicker = datepickerPlugin;

var defaults = $.fn.datepicker.defaults = {
autoclose: false,
Expand Down Expand Up @@ -1771,11 +1771,11 @@
return;
e.preventDefault();
// component click requires us to explicitly show it
$this.datepicker('show');
datepickerPlugin.call($this, 'show');
}
);
$(function(){
$('[data-provide="datepicker-inline"]').datepicker();
datepickerPlugin.call($('[data-provide="datepicker-inline"]'));
});

}(window.jQuery));

0 comments on commit 5f2863e

Please sign in to comment.