Roo/bootstrap/TimeField.js
authorEdward <edward@roojs.com>
Mon, 13 Oct 2014 06:56:48 +0000 (14:56 +0800)
committerEdward <edward@roojs.com>
Mon, 13 Oct 2014 06:56:48 +0000 (14:56 +0800)
Roo/bootstrap/TimeField.js

index f1db23b..d2c2dbe 100644 (file)
@@ -318,6 +318,18 @@ Roo.extend(Roo.bootstrap.TimeField, Roo.bootstrap.Input,  {
         Roo.log(this.inputEl().getLeft());
         Roo.log(this.picker().getWidth());
         
+        if((Roo.lib.Dom.getViewHeight() + Roo.get(document.body).getScroll().top) - (this.inputEl().getBottom() + this.picker().getHeight()) < 0){
+            /*
+             * place to the left of element!
+             *
+             */
+            
+            this.picker().addClass('top');
+            this.picker().setTop(0 - this.picker().getHeight()).setLeft(this.inputEl().getLeft() - this.el.getLeft());
+            
+            return;
+        }
+        
         if((Roo.lib.Dom.getViewHeight() + Roo.get(document.body).getScroll().top) - (this.inputEl().getBottom() + this.picker().getHeight()) < 0){
             /*
              * place to the top of element!