roojs-bootstrap.js wip_leon_T8140_publisher_publish_time_make_sure
authorleon <leon@roojs.com>
Wed, 17 Apr 2024 04:48:44 +0000 (12:48 +0800)
committerleon <leon@roojs.com>
Wed, 17 Apr 2024 04:48:44 +0000 (12:48 +0800)
roojs-bootstrap-debug.js

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

index 0923032..57ac636 100644 (file)
@@ -24142,6 +24142,9 @@ Roo.extend(Roo.bootstrap.form.DateField, Roo.bootstrap.form.Input,  {
         }
         if(typeof this.validator == "function"){
             var msg = this.validator(value);
+            if (typeof(msg) == 'string') {
+                this.invalidText = msg;
+            }
             if(msg !== true){
                 return false;
             }
index 6b8586f..bd2c70d 100644 (file)
@@ -1028,7 +1028,7 @@ if(this.startDate!==-Infinity){var B=this.parseDate(this.startDate);this.startDa
 }:function(){return C.getUTCMonth()!=G;};G=E+B;C.setUTCMonth(G);if(G<0||G>11){G=(G+12)%12;}}else{for(var i=0;i<F;i++){C=this.moveMonth(C,B);}G=C.getUTCMonth();C.setUTCDate(D);H=function(){return G!=C.getUTCMonth();};}while(H()){C.setUTCDate(--D);C.setUTCMonth(G);
 }return C;},moveYear:function(A,B){return this.moveMonth(A,B*12);},dateWithinRange:function(A){return A>=this.startDate&&A<=this.endDate;},remove:function(){this.picker().remove();},validateValue:function(A){if(this.getVisibilityEl().hasClass('hidden')){return true;
 }if(A.length<1){if(this.allowBlank){return true;}return false;}if(A.length<this.minLength){return false;}if(A.length>this.maxLength){return false;}if(this.vtype){var vt=Roo.form.VTypes;if(!vt[this.vtype](A,this)){return false;}}if(typeof this.validator=="function"){var B=this.validator(A);
-if(B!==true){return false;}}if(this.regex&&!this.regex.test(A)){return false;}if(!this.parseDate(A)){return false;}if(this.endDate!==Infinity&&this.parseDate(A).getTime()>this.endDate.getTime()){return false;}if(this.startDate!==-Infinity&&this.parseDate(A).getTime()<this.startDate.getTime()){return false;
+if(typeof(B)=='string'){this.invalidText=B;}if(B!==true){return false;}}if(this.regex&&!this.regex.test(A)){return false;}if(!this.parseDate(A)){return false;}if(this.endDate!==Infinity&&this.parseDate(A).getTime()>this.endDate.getTime()){return false;}if(this.startDate!==-Infinity&&this.parseDate(A).getTime()<this.startDate.getTime()){return false;
 }return true;},reset:function(){this.date=this.viewDate='';Roo.bootstrap.form.DateField.superclass.setValue.call(this,'');}});Roo.apply(Roo.bootstrap.form.DateField,{head:{tag:'thead',cn:[{tag:'tr',cn:[{tag:'th',cls:'prev',html:'<i class="fa fa-arrow-left"/>'}
 ,{tag:'th',cls:'switch',colspan:'5'},{tag:'th',cls:'next',html:'<i class="fa fa-arrow-right"/>'}]}]},content:{tag:'tbody',cn:[{tag:'tr',cn:[{tag:'td',colspan:'7'}]}]},footer:{tag:'tfoot',cn:[{tag:'tr',cn:[{tag:'th',colspan:'7',cls:'today'}]}]},dates:{},todayText:"Today",modes:[{clsName:'days',navFnc:'Month',navStep:1}
 ,{clsName:'months',navFnc:'FullYear',navStep:1},{clsName:'years',navFnc:'FullYear',navStep:10}]});Roo.apply(Roo.bootstrap.form.DateField,{template:{tag:'div',cls:'datepicker dropdown-menu roo-dynamic shadow',cn:[{tag:'div',cls:'datepicker-days',cn:[{tag:'table',cls:'table-condensed',cn:[Roo.bootstrap.form.DateField.head,{tag:'tbody'}