From 30f2b1b8abc07f9b0eece3a632521f1df2bf4145 Mon Sep 17 00:00:00 2001 From: Alexander Bosch Date: Mon, 24 Mar 2014 16:04:50 +0100 Subject: [PATCH] Fix datepicker popup position when displayed above its text field --- .../src/main/resources/js/datepicker/datepicker.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/echolot-webcontainer/src/main/resources/js/datepicker/datepicker.js b/echolot-webcontainer/src/main/resources/js/datepicker/datepicker.js index f606f2b..e217336 100644 --- a/echolot-webcontainer/src/main/resources/js/datepicker/datepicker.js +++ b/echolot-webcontainer/src/main/resources/js/datepicker/datepicker.js @@ -474,7 +474,7 @@ this.layout(this.gDiv); switch (options.position){ case 'top': - top -= inputfield.offsetHeight; + top -= cal.outerHeight(); break; case 'left': left -= inputfield.offsetWidth; @@ -489,6 +489,10 @@ top += inputfield.offsetHeight; left -= cal.outerWidth() - inputfield.offsetWidth; break; + case 'top-right': + top -= cal.outerHeight() - inputfield.offsetHeight; + left += inputfield.offsetWidth; + break; } cal.css({