Skip to content
Permalink
Browse files

Datepicker div now appends to the document after the datepicker(); fu…

…nction is called instead of automatically on include.
  • Loading branch information
1Marc committed Jul 20, 2008
1 parent 5e12861 commit d675c6c5104cba85a059c2eafbd59a8a2abfeff8
Showing with 12 additions and 6 deletions.
  1. +12 −6 ui/ui.datepicker.js
@@ -1560,6 +1560,17 @@ function isArray(a) {
Object - settings for attaching new datepicker functionality
@return jQuery object */
$.fn.datepicker = function(options){

/* Initialise the date picker. */
if (!$.datepicker.initialized) {
$(function() {
$(document.body)
.append($.datepicker.dpDiv)
.mousedown($.datepicker._checkExternalClick);
});
$.datepicker.initialized = true;
}

var otherArgs = Array.prototype.slice.call(arguments, 1);
if (typeof options == 'string' && (options == 'isDisabled' || options == 'getDate'))
return $.datepicker['_' + options + 'Datepicker'].
@@ -1573,11 +1584,6 @@ $.fn.datepicker = function(options){
};

$.datepicker = new Datepicker(); // singleton instance

/* Initialise the date picker. */
$(document).ready(function() {
$(document.body).append($.datepicker.dpDiv).
mousedown($.datepicker._checkExternalClick);
});
$.datepicker.initialized = false;

})(jQuery);

0 comments on commit d675c6c

Please sign in to comment.
You can’t perform that action at this time.