From a6b9ee1959028d258b667b5c4269bb8d7d247a23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vesa=20V=C3=A4nsk=C3=A4?= Date: Thu, 12 May 2011 13:01:09 +0300 Subject: [PATCH 1/2] Fixes incorrect position when parent element is position: relative --- jquery.date_input.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.date_input.js b/jquery.date_input.js index 84ae311..4621567 100644 --- a/jquery.date_input.js +++ b/jquery.date_input.js @@ -216,10 +216,10 @@ DateInput.prototype = { }, setPosition: function() { - var offset = this.input.offset(); + var position = this.input.position(); this.rootLayers.css({ - top: offset.top + this.input.outerHeight(), - left: offset.left + top: position.top + this.input.outerHeight(), + left: position.left }); if (this.ieframe) { From 783a28b879f45337d9f1f0649482345954811631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vesa=20V=C3=A4nsk=C3=A4?= Date: Thu, 12 May 2011 13:13:13 +0300 Subject: [PATCH 2/2] Fixes incorrect closing detection when date input parent element is position: relative --- jquery.date_input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery.date_input.js b/jquery.date_input.js index 4621567..3ed61ff 100644 --- a/jquery.date_input.js +++ b/jquery.date_input.js @@ -156,7 +156,7 @@ DateInput.prototype = { // Returns true if the given event occurred inside the date selector insideSelector: function(event) { - var offset = this.dateSelector.position(); + var offset = this.dateSelector.offset(); offset.right = offset.left + this.dateSelector.outerWidth(); offset.bottom = offset.top + this.dateSelector.outerHeight();