From 8068ced34f12b7cc112623e258d5635dbd5cf2a8 Mon Sep 17 00:00:00 2001 From: john Date: Mon, 15 Oct 2018 13:50:42 +0800 Subject: [PATCH] roojs-bootstrap.js roojs-bootstrap-debug.js --- roojs-bootstrap-debug.js | 1 + roojs-bootstrap.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/roojs-bootstrap-debug.js b/roojs-bootstrap-debug.js index e53a315351..04dbd57d05 100644 --- a/roojs-bootstrap-debug.js +++ b/roojs-bootstrap-debug.js @@ -18947,6 +18947,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input, { } Roo.each(this.picker().select('>div',true).elements, function(v){ + Roo.log(v); v.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay = 'block'; v.hide(); }); diff --git a/roojs-bootstrap.js b/roojs-bootstrap.js index ca12ec963e..f33ef186b3 100644 --- a/roojs-bootstrap.js +++ b/roojs-bootstrap.js @@ -777,8 +777,8 @@ I.setUTCDate(J);I.setUTCDate(J-(I.getUTCDay()-this.weekStart+7)%7);var K=new Dat var Q=this.date&&this.date.getUTCMonth();this.picker().select('>.datepicker-months th.switch',true).first().dom.innerHTML=A;Roo.each(this.picker().select('>.datepicker-months tbody span',true).elements,function(v,k){v.removeClass('active');if(P===A&&k===Q){v.addClass('active'); }if(AE||(A==C&&kF)){v.addClass('disabled');}});A=parseInt(A/10,10)*10;this.picker().select('>.datepicker-years th.switch',true).first().dom.innerHTML=A+'-'+(A+9);this.picker().select('>.datepicker-years tbody td',true).first().dom.innerHTML=''; A-=1;for(var i=-1;i<11;i++){this.picker().select('>.datepicker-years tbody td',true).first().createChild({tag:'span',cls:'year'+(i===-1||i===10?' old':'')+(P===A?' active':'')+(AE?' disabled':''),html:A});A+=1;}},showMode:function(A){if(A){this.viewMode=Math.max(this.minViewMode,Math.min(2,this.viewMode+A)); -}Roo.each(this.picker().select('>div',true).elements,function(v){v.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';v.hide();});this.picker().select('>.datepicker-'+Roo.bootstrap.DateField.modes[this.viewMode].clsName,true).first().show();},place:function(){if(this.isInline){return; -}this.picker().removeClass(['bottom','top']);if((Roo.lib.Dom.getViewHeight()+Roo.get(document.body).getScroll().top)-(this.inputEl().getBottom()+this.picker().getHeight())<0){this.picker().addClass('top');this.picker().setTop(this.inputEl().getTop()-this.picker().getHeight()).setLeft(this.inputEl().getLeft()); +}Roo.each(this.picker().select('>div',true).elements,function(v){Roo.log(v);v.setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';v.hide();});this.picker().select('>.datepicker-'+Roo.bootstrap.DateField.modes[this.viewMode].clsName,true).first().show(); +},place:function(){if(this.isInline){return;}this.picker().removeClass(['bottom','top']);if((Roo.lib.Dom.getViewHeight()+Roo.get(document.body).getScroll().top)-(this.inputEl().getBottom()+this.picker().getHeight())<0){this.picker().addClass('top');this.picker().setTop(this.inputEl().getTop()-this.picker().getHeight()).setLeft(this.inputEl().getLeft()); return;}this.picker().addClass('bottom');this.picker().setTop(this.inputEl().getBottom()).setLeft(this.inputEl().getLeft());},parseDate:function(A){if(!A||A instanceof Date){return A;}var v=Date.parseDate(A,this.format);if(!v&&(this.useIso||A.match(/^(\d{4})-0?(\d+)-0?(\d+)/))){v=Date.parseDate(A,'Y-m-d'); }if(!v&&this.altFormats){if(!this.altFormatsArray){this.altFormatsArray=this.altFormats.split("|");}for(var i=0,B=this.altFormatsArray.length;i