roojs-bootstrap.js
authorEdward <edward@roojs.com>
Thu, 23 Apr 2015 07:28:32 +0000 (15:28 +0800)
committerEdward <edward@roojs.com>
Thu, 23 Apr 2015 07:28:32 +0000 (15:28 +0800)
roojs-bootstrap-debug.js

roojs-bootstrap-debug.js
roojs-bootstrap.js

index f1def39..01016b8 100644 (file)
@@ -14555,7 +14555,9 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
                 v.hide();
             })
             
-            this.picker().select('tbody > tr > td', true).first().setStyle('width', '189px');
+            Roo.each(this.picker().select('tbody > tr > td', true).elements, function(v){
+                v.setStyle('width', '189px');
+            });
         }
         
         Roo.each(this.picker().select('tfoot th.today', true).elements, function(v){
@@ -14857,7 +14859,7 @@ Roo.extend(Roo.bootstrap.DateField, Roo.bootstrap.Input,  {
     },
     
     formatDate : function(date, fmt)
-    {
+    {   
         return (!date || !(date instanceof Date)) ?
         date : date.dateFormat(fmt || this.format);
     },
index c4b1887..68b0147 100644 (file)
@@ -326,7 +326,7 @@ this.fireEvent('changed',this,A);}});
 Roo.bootstrap.DateField=function(A){Roo.bootstrap.DateField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.DateField,Roo.bootstrap.Input,{format:"m/d/y",altFormats:"m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d",weekStart:0,viewMode:'',minViewMode:'',todayHighlight:false,todayBtn:false,language:'en',keyboardNavigation:true,calendarWeeks:false,startDate:-Infinity,endDate:Infinity,daysOfWeekDisabled:[],_events:[],singleMode:false,UTCDate:function(){return new Date(Date.UTC.apply(Date,arguments));},UTCToday:function(){var A=new Date();return this.UTCDate(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate());},getDate:function(){var d=this.getUTCDate();return new Date(d.getTime()+(d.getTimezoneOffset()*60000));},getUTCDate:function(){return this.date;},setDate:function(d){this.setUTCDate(new Date(d.getTime()-(d.getTimezoneOffset()*60000)));},setUTCDate:function(d){this.date=d;this.setValue(this.formatDate(this.date));},onRender:function(ct,A){Roo.bootstrap.DateField.superclass.onRender.call(this,ct,A);this.language=this.language||'en';this.language=this.language in Roo.bootstrap.DateField.dates?this.language:this.language.split('-')[0];this.language=this.language in Roo.bootstrap.DateField.dates?this.language:"en";this.isRTL=Roo.bootstrap.DateField.dates[this.language].rtl||false;this.format=this.format||'m/d/y';this.isInline=false;this.isInput=true;this.component=this.el.select('.add-on',true).first()||false;this.component=(this.component&&this.component.length===0)?false:this.component;this.hasInput=this.component&&this.inputEL().length;if(typeof(this.minViewMode==='string')){switch(this.minViewMode){case 'months':this.minViewMode=1;break;case 'years':this.minViewMode=2;break;default:this.minViewMode=0;break;}}if(typeof(this.viewMode==='string')){switch(this.viewMode){case 'months':this.viewMode=1;break;case 'years':this.viewMode=2;break;default:this.viewMode=0;break;}}
 this.pickerEl=Roo.get(document.body).createChild(Roo.bootstrap.DateField.template);this.picker().setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.picker().on('mousedown',this.onMousedown,this);this.picker().on('click',this.onClick,this);this.picker().addClass('datepicker-dropdown');this.startViewMode=this.viewMode;if(this.singleMode){Roo.each(this.picker().select('thead > tr > th',true).elements,function(v){v.setVisibilityMode(Roo.Element.DISPLAY)
 v.hide();})
-this.picker().select('tbody > tr > td',true).first().setStyle('width','189px');}
+Roo.each(this.picker().select('tbody > tr > td',true).elements,function(v){v.setStyle('width','189px');});}
 Roo.each(this.picker().select('tfoot th.today',true).elements,function(v){if(!this.calendarWeeks){v.remove();return;};v.dom.innerHTML=Roo.bootstrap.DateField.dates[this.language].today
 v.attr('colspan',function(i,B){return parseInt(B)+1;});})
 this.weekEnd=this.weekStart===0?6:this.weekStart-1;this.setStartDate(this.startDate);this.setEndDate(this.endDate);this.setDaysOfWeekDisabled(this.daysOfWeekDisabled);this.fillDow();this.fillMonths();this.update();this.showMode();if(this.isInline){this.show();}},picker:function(){return this.pickerEl;},fillDow:function(){var A=this.weekStart;var B={tag:'tr',cn:[]};if(this.calendarWeeks){B.cn.push({tag:'th',cls:'cw',html:'&nbsp;'})}while(A<this.weekStart+7){B.cn.push({tag:'th',cls:'dow',html:Roo.bootstrap.DateField.dates[this.language].daysMin[(A++)%7]});}