Roo/bootstrap/DateField.js
[roojs1] / Roo / bootstrap / DateField.js
index 1361229..72d3b77 100644 (file)
@@ -227,7 +227,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
         this.showMode();
         
         if(this.isInline) {
-            this.show();
+            this.showPopup();
         }
     },
     
@@ -510,7 +510,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
     onFocus : function()
     {
         Roo.bootstrap.DateField.superclass.onFocus.call(this);
-        this.show();
+        this.showPopup();
     },
     
     onBlur : function()
@@ -521,28 +521,28 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
         
         this.setValue(d);
                 
-        this.hide();
+        this.hidePopup();
     },
     
-    show : function()
+    showPopup : function()
     {
         this.picker().show();
         this.update();
         this.place();
         
-        this.fireEvent('show', this, this.date);
+        this.fireEvent('showpopup', this, this.date);
     },
     
-    hide : function()
+    hidePopup : function()
     {
         if(this.isInline) {
             return;
         }
-        this.picker().hide();
+        // this.picker().hide();
         this.viewMode = this.startViewMode;
         this.showMode();
         
-        this.fireEvent('hide', this, this.date);
+        this.fireEvent('hidepopup', this, this.date);
         
     },
     
@@ -590,7 +590,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
     {
         if (!this.picker().isVisible()){
             if (e.keyCode == 27) { // allow escape to hide and re-show picker
-                this.show();
+                this.showPopup();
             }
             return;
         }
@@ -601,7 +601,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
         
         switch(e.keyCode){
             case 27: // escape
-                this.hide();
+                this.hidePopup();
                 e.preventDefault();
                 break;
             case 37: // left
@@ -661,12 +661,12 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
                 break;
             case 13: // enter
                 this.setValue(this.formatDate(this.date));
-                this.hide();
+                this.hidePopup();
                 e.preventDefault();
                 break;
             case 9: // tab
                 this.setValue(this.formatDate(this.date));
-                this.hide();
+                this.hidePopup();
                 break;
             case 16: // shift
             case 17: // ctrl
@@ -721,7 +721,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
 //                        this.fill()
                         this.setValue(this.formatDate(this.date));
                         
-                        this.hide();
+                        this.hidePopup();
                         break;
                 }
                 break;
@@ -738,7 +738,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
                     
                     if(this.singleMode){
                         this.setValue(this.formatDate(this.viewDate));
-                        this.hide();
+                        this.hidePopup();
                         return;
                     }
                     
@@ -775,7 +775,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
 //                    this.fill();
                     //Roo.log(this.formatDate(this.date));
                     this.setValue(this.formatDate(this.date));
-                    this.hide();
+                    this.hidePopup();
                 }
                 break;
         }
@@ -985,23 +985,6 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
         this.date = this.viewDate = '';
         
         Roo.bootstrap.DateField.superclass.setValue.call(this, '');
-    },
-    
-    setVisible : function(visible)
-    {
-        if(!this.getEl()){
-            return;
-        }
-        
-        this.getEl().removeClass('hidden');
-        
-        if(visible){
-            this.fireEvent('show', this);
-            return;
-        }
-        
-        this.getEl().addClass('hidden');
-        this.fireEvent('hide', this);
     }
    
 });