Roo/bootstrap/form/TimeField.js
authorleon <leon@roojs.com>
Wed, 9 Aug 2023 05:14:18 +0000 (13:14 +0800)
committerleon <leon@roojs.com>
Wed, 9 Aug 2023 05:14:18 +0000 (13:14 +0800)
roojs-bootstrap.js
roojs-bootstrap-debug.js

Roo/bootstrap/form/TimeField.js
roojs-bootstrap-debug.js
roojs-bootstrap.js

index 2d6a651..ceae215 100644 (file)
@@ -66,6 +66,8 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
         
         Roo.bootstrap.form.TimeField.superclass.onRender.call(this, ct, position);
 
+        Roo.log(this.language);
+
         this.language = this.language in Roo.bootstrap.form.TimeField.periodText ? this.language : "en";
                 
         this.pickerEl = Roo.get(document.body).createChild(Roo.bootstrap.form.TimeField.template);
index 5b67472..c025f7b 100644 (file)
@@ -24163,6 +24163,8 @@ Roo.extend(Roo.bootstrap.form.TimeField, Roo.bootstrap.form.Input,  {
         
         Roo.bootstrap.form.TimeField.superclass.onRender.call(this, ct, position);
 
+        Roo.log(this.language);
+
         this.language = this.language in Roo.bootstrap.form.TimeField.periodText ? this.language : "en";
                 
         this.pickerEl = Roo.get(document.body).createChild(Roo.bootstrap.form.TimeField.template);
index c133c40..ff690ab 100644 (file)
@@ -1027,9 +1027,9 @@ if(B!==true){return false;}}if(this.regex&&!this.regex.test(A)){return false;}if
 ]}]}});
 // Roo/bootstrap/form/TimeField.js
 Roo.bootstrap.form.TimeField=function(A){Roo.bootstrap.form.TimeField.superclass.constructor.call(this,A);this.addEvents({show:true,hide:true,select:true});};Roo.extend(Roo.bootstrap.form.TimeField,Roo.bootstrap.form.Input,{format:"H:i",minuteStep:1,language:'en',getAutoCreate:function(){this.after='<i class="fa far fa-clock"></i>';
-return Roo.bootstrap.form.TimeField.superclass.getAutoCreate.call(this);},onRender:function(ct,A){Roo.bootstrap.form.TimeField.superclass.onRender.call(this,ct,A);this.language=this.language in Roo.bootstrap.form.TimeField.periodText?this.language:"en";this.pickerEl=Roo.get(document.body).createChild(Roo.bootstrap.form.TimeField.template);
-this.picker().setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.pop=this.picker().select('>.datepicker-time',true).first();this.pop.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.fillTime();this.update();this.pop.select('.hours-up',true).first().on('click',this.onIncrementHours,this);this.pop.select('.hours-down',true).first().on('click',this.onDecrementHours,this);
+return Roo.bootstrap.form.TimeField.superclass.getAutoCreate.call(this);},onRender:function(ct,A){Roo.bootstrap.form.TimeField.superclass.onRender.call(this,ct,A);Roo.log(this.language);this.language=this.language in Roo.bootstrap.form.TimeField.periodText?this.language:"en";
+this.pickerEl=Roo.get(document.body).createChild(Roo.bootstrap.form.TimeField.template);this.picker().setVisibilityMode(Roo.Element.DISPLAY).originalDisplay='block';this.pop=this.picker().select('>.datepicker-time',true).first();this.pop.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.fillTime();this.update();this.pop.select('.hours-up',true).first().on('click',this.onIncrementHours,this);this.pop.select('.hours-down',true).first().on('click',this.onDecrementHours,this);
 this.pop.select('.minutes-up',true).first().on('click',this.onIncrementMinutes,this);this.pop.select('.minutes-down',true).first().on('click',this.onDecrementMinutes,this);this.pop.select('button.period',true).first().on('click',this.onTogglePeriod,this);
 this.pop.select('button.ok',true).first().on('click',this.setTime,this);this.pop.select('button.ok',true).first().dom.innerHTML=Roo.bootstrap.form.TimeField.okText;},fireKey:function(e){if(!this.picker().isVisible()){if(e.keyCode==27){this.show();}return;
 }e.preventDefault();switch(e.keyCode){case 27:this.hide();break;case 37:case 39:this.onTogglePeriod();break;case 38:this.onIncrementMinutes();break;case 40:this.onDecrementMinutes();break;case 13:case 9:this.setTime();break;}},onClick:function(e){e.stopPropagation();