From d61e1d3fc7393ac965640f8f784cc6e8bab8f682 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Herceg?= Date: Mon, 19 Feb 2024 14:35:24 +0100 Subject: [PATCH] Fixed default format strings --- .../Resources/Scripts/Globalize/globalize.js | 2 +- .../Resources/Scripts/Globalize/globalize.min.js | 2 +- src/Samples/Tests/Tests/Control/TextBoxTests.cs | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Framework/Framework/Resources/Scripts/Globalize/globalize.js b/src/Framework/Framework/Resources/Scripts/Globalize/globalize.js index 6b889b450e..b783e76917 100644 --- a/src/Framework/Framework/Resources/Scripts/Globalize/globalize.js +++ b/src/Framework/Framework/Resources/Scripts/Globalize/globalize.js @@ -241,7 +241,7 @@ Globalize.cultures[ "default" ] = { // G is a combination of the short date ("d") and short time ("T") patterns, separated by a space G: "M/d/yyyy h:mm:ss tt" }, - additionalDefaultPatterns: ["h:mm", "h:mm:ss"] + additionalDefaultPatterns: ["H:mm", "H:mm:ss"] // optional fields for each calendar: /* monthsGenitive: diff --git a/src/Framework/Framework/Resources/Scripts/Globalize/globalize.min.js b/src/Framework/Framework/Resources/Scripts/Globalize/globalize.min.js index c1f85cf7cf..62b662be31 100644 --- a/src/Framework/Framework/Resources/Scripts/Globalize/globalize.min.js +++ b/src/Framework/Framework/Resources/Scripts/Globalize/globalize.min.js @@ -6,4 +6,4 @@ * Copyright Software Freedom Conservancy, Inc. * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license - */(function(de,I){var h,ne,ae,ie,fe,P,J,K,L,ue,Q,$,H,X,j,q,V,ee,le,te,R,U,W,_;h=function(e){return new h.prototype.init(e)},typeof require!="undefined"&&typeof exports!="undefined"&&typeof module!="undefined"?module.exports=h:de.dotvvm_Globalize=h,h.cultures={},h.prototype={constructor:h,init:function(e){return this.cultures=h.cultures,this.cultureSelector=e,this}},h.prototype.init.prototype=h.prototype,h.cultures.default={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt"},additionalDefaultPatterns:["h:mm","h:mm:ss"]}},messages:{}},h.cultures.default.calendar=h.cultures.default.calendars.standard,h.cultures.en=h.cultures.default,h.cultureSelector="en",ne=/^0x[a-f0-9]+$/i,ae=/^[+-]?infinity$/i,ie=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,fe=/^\s+|\s+$/g,P=function(e,r){if(e.indexOf)return e.indexOf(r);for(var n=0,s=e.length;n1&&S.length1?parseInt(c[1],10):0;f=c[0],c=f.split("."),f=c[0],l=c.length>1?c[1]:"";var b;p>0?(l=j(l,p,!1),f+=l.slice(0,p),l=l.substr(p)):p<0&&(p=-p,f=j(f,p+1),l=f.slice(-p,f.length)+l,f=f.slice(0,-p)),n>0?l=s["."]+(l.length>n?l.slice(0,n):j(l,n)):l="";for(var k=f.length-1,g=s[","],y="";k>=0;){if(o===0||o>k)return f.slice(0,k+1)+(y.length?g+y+l:l);y=f.slice(k-o+1,k+1)+(y.length?g+y:""),k-=o,a1&&(o=parseInt(n.slice(1),10));var u=n.charAt(0).toUpperCase(),d="DGNCP";if(d.indexOf(u)>-1){var f,l;switch(u){case"D":a="n",t=X(t),o!==-1&&(t=j(""+t,o,!0)),r<0&&(t="-"+t);break;case"G":l=[0];var c=t.toString();c.indexOf(".")>=0?o=c.length-c.indexOf(".")-1:o=0;case"N":f=i;case"C":f=f||i.currency;case"P":f=f||i.percent,a=r<0?f.pattern[0]:f.pattern[1]||"n",o===-1&&(o=f.decimals),t=e(t*(u==="P"?100:1),o,f,l);break;default:throw"Bad number format specifier: "+u}for(var p=/n|\$|-|%/g,b="";;){var k=p.lastIndex,g=p.exec(a);if(b+=a.slice(k,g?g.index:a.length),!g)break;switch(g[0]){case"n":b+=t;break;case"$":b+=i.currency.symbol;break;case"-":/[1-9]/.test(t)&&(b+=i["-"]);break;case"%":b+=i.percent.symbol;break}}return b}else{if(n.match(/^[0#.,]+$/g)!=null&&n.match(/^[0#.,]+$/g).length>0)return formatCustomNumber(r,n,s.numberFormat);throw"Bad number format: "+n}}}(),formatCustomNumber=function(t,a,n){if(!a||isNaN(+t))return t;var s=".",i=",",t=a.charAt(0)=="-"?-t:+t,o=t<0?t=-t:0,a=a.split(s);t=toFixed(t,a.length>1?a[1].length:0),t=+t+"";var u=a.length>1?a[1].lastIndexOf("0"):0,d=t.split(s);a.length>1&&(!d[1]||d[1]&&d[1].length<=u)&&(t=(+t).toFixed(u+1));var f=a[0].split(i);a[0]=f.join("");var l=a[0]&&a[0].indexOf("0");if(l>-1)for(;d[0].length1&&t.length>1?n["."]+t[1]:"",(o?"-":"")+t[0]+t[1]},toFixed=function(e,r){return(+(Math.round(+(e+"e"+r))+"e"+-r)).toFixed(r)},te=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},R=function(e,r){if(!r)return 0;for(var n,s=e.getTime(),i=0,t=r.length;i=n)return i;return 0},U=function(e,r,n,s){var i=e.getFullYear();return!s&&r.eras&&(i-=r.eras[n].offset),i},function(){var e,r,n,s,i,t,o;e=function(a,u){if(u<100){var d=new Date,f=R(d),l=U(d,a,f),c=a.twoDigitYearMax;c=typeof c=="string"?new Date().getFullYear()%100+parseInt(c,10):c,u+=l-l%100,u>c&&(u-=100)}return u},r=function(a,u,d){var f,l=a.days,c=a._upperDays;return c||(a._upperDays=c=[o(l.names),o(l.namesAbbr),o(l.namesShort)]),u=t(u),d?(f=P(c[1],u),f===-1&&(f=P(c[2],u))):f=P(c[0],u),f},n=function(a,u,d){var f=a.months,l=a.monthsGenitive||a.months,c=a._upperMonths,p=a._upperMonthsGen;c||(a._upperMonths=c=[o(f.names),o(f.namesAbbr)],a._upperMonthsGen=p=[o(l.names),o(l.namesAbbr)]),u=t(u);var b=P(d?c[1]:c[0],u);return b<0&&(b=P(d?p[1]:p[0],u)),b},s=function(a,u){var d=a._parseRegExp;if(!d)a._parseRegExp=d={};else{var f=d[u];if(f)return f}for(var l=V(a,u).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),c=["^"],p=[],b=0,k=0,g=te(),y;(y=g.exec(l))!==null;){var M=l.slice(b,y.index);if(b=g.lastIndex,k+=q(M,c),k%2){c.push(y[0]);continue}var A=y[0],z=A.length,F;switch(A){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":F="(\\D+)";break;case"tt":case"t":F="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":F="(\\d{"+z+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":F="(\\d\\d?)";break;case"zzz":F="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":F="([+-]?\\d\\d?)";break;case"/":F="(\\"+a["/"]+")";break;default:throw"Invalid date format pattern '"+A+"'."}F&&c.push(F),p.push(y[0])}q(l.slice(b),c),c.push("$");var C=c.join("").replace(/\s+/g,"\\s+"),E={regExp:C,groups:p};return d[u]=E},i=function(a,u,d){return ad},t=function(a){return a.split("\xA0").join(" ").toUpperCase()},o=function(a){for(var u=[],d=0,f=a.length;d-1&&(e=e.replace(s.numberFormat.currency.symbol,""),e=e.replace(s.numberFormat.currency["."],s.numberFormat["."])),e=H(e),ae.test(e))i=parseFloat(e);else if(!r&&ne.test(e))i=parseInt(e,16);else{var o=_(e,t,t.pattern[0]),a=o[0],u=o[1];a===""&&t.pattern[0]!=="(n)"&&(o=_(e,t,"(n)"),a=o[0],u=o[1]),a===""&&t.pattern[0]!=="-n"&&(o=_(e,t,"-n"),a=o[0],u=o[1]),a=a||"+";var d,f,l=u.indexOf("e");l<0&&(l=u.indexOf("E")),l<0?(f=u,d=null):(f=u.substr(0,l),d=u.substr(l+1));var c,p,b=t["."],k=f.indexOf(b);k<0?(c=f,p=null):(c=f.substr(0,k),p=f.substr(k+b.length));var g=t[","];c=c.split(g).join("");var y=g.replace(/\u00A0/g," ");g!==y&&(c=c.split(y).join(""));var M=a+c;if(p!==null&&(M+="."+p),d!==null){var A=_(d,t,"-n");M+="e"+(A[0]||"+")+A[1]}ie.test(M)&&(i=parseFloat(M))}return i},h.culture=function(e){return typeof e!="undefined"&&(this.cultureSelector=e),this.findClosestCulture(e)||this.culture.default}})(this); + */(function(de,I){var h,ne,ae,ie,fe,P,J,K,L,ue,Q,$,S,X,j,q,V,ee,le,te,R,U,W,_;h=function(e){return new h.prototype.init(e)},typeof require!="undefined"&&typeof exports!="undefined"&&typeof module!="undefined"?module.exports=h:de.dotvvm_Globalize=h,h.cultures={},h.prototype={constructor:h,init:function(e){return this.cultures=h.cultures,this.cultureSelector=e,this}},h.prototype.init.prototype=h.prototype,h.cultures.default={name:"en",englishName:"English",nativeName:"English",isRTL:!1,language:"en",numberFormat:{pattern:["-n"],decimals:2,",":",",".":".",groupSizes:[3],"+":"+","-":"-",NaN:"NaN",negativeInfinity:"-Infinity",positiveInfinity:"Infinity",percent:{pattern:["-n %","n %"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"%"},currency:{pattern:["($n)","$n"],decimals:2,groupSizes:[3],",":",",".":".",symbol:"$"}},calendars:{standard:{name:"Gregorian_USEnglish","/":"/",":":":",firstDay:0,days:{names:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],namesAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],namesShort:["Su","Mo","Tu","We","Th","Fr","Sa"]},months:{names:["January","February","March","April","May","June","July","August","September","October","November","December",""],namesAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec",""]},AM:["AM","am","AM"],PM:["PM","pm","PM"],eras:[{name:"A.D.",start:null,offset:0}],twoDigitYearMax:2029,patterns:{d:"M/d/yyyy",D:"dddd, MMMM dd, yyyy",t:"h:mm tt",T:"h:mm:ss tt",f:"dddd, MMMM dd, yyyy h:mm tt",F:"dddd, MMMM dd, yyyy h:mm:ss tt",M:"MMMM dd",Y:"yyyy MMMM",S:"yyyy'-'MM'-'dd'T'HH':'mm':'ss",g:"M/d/yyyy h:mm tt",G:"M/d/yyyy h:mm:ss tt"},additionalDefaultPatterns:["H:mm","H:mm:ss"]}},messages:{}},h.cultures.default.calendar=h.cultures.default.calendars.standard,h.cultures.en=h.cultures.default,h.cultureSelector="en",ne=/^0x[a-f0-9]+$/i,ae=/^[+-]?infinity$/i,ie=/^[+-]?\d*\.?\d*(e[+-]?\d+)?$/,fe=/^\s+|\s+$/g,P=function(e,r){if(e.indexOf)return e.indexOf(r);for(var n=0,s=e.length;n1&&H.length1?parseInt(c[1],10):0;f=c[0],c=f.split("."),f=c[0],l=c.length>1?c[1]:"";var b;p>0?(l=j(l,p,!1),f+=l.slice(0,p),l=l.substr(p)):p<0&&(p=-p,f=j(f,p+1),l=f.slice(-p,f.length)+l,f=f.slice(0,-p)),n>0?l=s["."]+(l.length>n?l.slice(0,n):j(l,n)):l="";for(var k=f.length-1,g=s[","],y="";k>=0;){if(o===0||o>k)return f.slice(0,k+1)+(y.length?g+y+l:l);y=f.slice(k-o+1,k+1)+(y.length?g+y:""),k-=o,a1&&(o=parseInt(n.slice(1),10));var u=n.charAt(0).toUpperCase(),d="DGNCP";if(d.indexOf(u)>-1){var f,l;switch(u){case"D":a="n",t=X(t),o!==-1&&(t=j(""+t,o,!0)),r<0&&(t="-"+t);break;case"G":l=[0];var c=t.toString();c.indexOf(".")>=0?o=c.length-c.indexOf(".")-1:o=0;case"N":f=i;case"C":f=f||i.currency;case"P":f=f||i.percent,a=r<0?f.pattern[0]:f.pattern[1]||"n",o===-1&&(o=f.decimals),t=e(t*(u==="P"?100:1),o,f,l);break;default:throw"Bad number format specifier: "+u}for(var p=/n|\$|-|%/g,b="";;){var k=p.lastIndex,g=p.exec(a);if(b+=a.slice(k,g?g.index:a.length),!g)break;switch(g[0]){case"n":b+=t;break;case"$":b+=i.currency.symbol;break;case"-":/[1-9]/.test(t)&&(b+=i["-"]);break;case"%":b+=i.percent.symbol;break}}return b}else{if(n.match(/^[0#.,]+$/g)!=null&&n.match(/^[0#.,]+$/g).length>0)return formatCustomNumber(r,n,s.numberFormat);throw"Bad number format: "+n}}}(),formatCustomNumber=function(t,a,n){if(!a||isNaN(+t))return t;var s=".",i=",",t=a.charAt(0)=="-"?-t:+t,o=t<0?t=-t:0,a=a.split(s);t=toFixed(t,a.length>1?a[1].length:0),t=+t+"";var u=a.length>1?a[1].lastIndexOf("0"):0,d=t.split(s);a.length>1&&(!d[1]||d[1]&&d[1].length<=u)&&(t=(+t).toFixed(u+1));var f=a[0].split(i);a[0]=f.join("");var l=a[0]&&a[0].indexOf("0");if(l>-1)for(;d[0].length1&&t.length>1?n["."]+t[1]:"",(o?"-":"")+t[0]+t[1]},toFixed=function(e,r){return(+(Math.round(+(e+"e"+r))+"e"+-r)).toFixed(r)},te=function(){return/\/|dddd|ddd|dd|d|MMMM|MMM|MM|M|yyyy|yy|y|hh|h|HH|H|mm|m|ss|s|tt|t|fff|ff|f|zzz|zz|z|gg|g/g},R=function(e,r){if(!r)return 0;for(var n,s=e.getTime(),i=0,t=r.length;i=n)return i;return 0},U=function(e,r,n,s){var i=e.getFullYear();return!s&&r.eras&&(i-=r.eras[n].offset),i},function(){var e,r,n,s,i,t,o;e=function(a,u){if(u<100){var d=new Date,f=R(d),l=U(d,a,f),c=a.twoDigitYearMax;c=typeof c=="string"?new Date().getFullYear()%100+parseInt(c,10):c,u+=l-l%100,u>c&&(u-=100)}return u},r=function(a,u,d){var f,l=a.days,c=a._upperDays;return c||(a._upperDays=c=[o(l.names),o(l.namesAbbr),o(l.namesShort)]),u=t(u),d?(f=P(c[1],u),f===-1&&(f=P(c[2],u))):f=P(c[0],u),f},n=function(a,u,d){var f=a.months,l=a.monthsGenitive||a.months,c=a._upperMonths,p=a._upperMonthsGen;c||(a._upperMonths=c=[o(f.names),o(f.namesAbbr)],a._upperMonthsGen=p=[o(l.names),o(l.namesAbbr)]),u=t(u);var b=P(d?c[1]:c[0],u);return b<0&&(b=P(d?p[1]:p[0],u)),b},s=function(a,u){var d=a._parseRegExp;if(!d)a._parseRegExp=d={};else{var f=d[u];if(f)return f}for(var l=V(a,u).replace(/([\^\$\.\*\+\?\|\[\]\(\)\{\}])/g,"\\\\$1"),c=["^"],p=[],b=0,k=0,g=te(),y;(y=g.exec(l))!==null;){var M=l.slice(b,y.index);if(b=g.lastIndex,k+=q(M,c),k%2){c.push(y[0]);continue}var A=y[0],z=A.length,F;switch(A){case"dddd":case"ddd":case"MMMM":case"MMM":case"gg":case"g":F="(\\D+)";break;case"tt":case"t":F="(\\D*)";break;case"yyyy":case"fff":case"ff":case"f":F="(\\d{"+z+"})";break;case"dd":case"d":case"MM":case"M":case"yy":case"y":case"HH":case"H":case"hh":case"h":case"mm":case"m":case"ss":case"s":F="(\\d\\d?)";break;case"zzz":F="([+-]?\\d\\d?:\\d{2})";break;case"zz":case"z":F="([+-]?\\d\\d?)";break;case"/":F="(\\"+a["/"]+")";break;default:throw"Invalid date format pattern '"+A+"'."}F&&c.push(F),p.push(y[0])}q(l.slice(b),c),c.push("$");var C=c.join("").replace(/\s+/g,"\\s+"),E={regExp:C,groups:p};return d[u]=E},i=function(a,u,d){return ad},t=function(a){return a.split("\xA0").join(" ").toUpperCase()},o=function(a){for(var u=[],d=0,f=a.length;d-1&&(e=e.replace(s.numberFormat.currency.symbol,""),e=e.replace(s.numberFormat.currency["."],s.numberFormat["."])),e=S(e),ae.test(e))i=parseFloat(e);else if(!r&&ne.test(e))i=parseInt(e,16);else{var o=_(e,t,t.pattern[0]),a=o[0],u=o[1];a===""&&t.pattern[0]!=="(n)"&&(o=_(e,t,"(n)"),a=o[0],u=o[1]),a===""&&t.pattern[0]!=="-n"&&(o=_(e,t,"-n"),a=o[0],u=o[1]),a=a||"+";var d,f,l=u.indexOf("e");l<0&&(l=u.indexOf("E")),l<0?(f=u,d=null):(f=u.substr(0,l),d=u.substr(l+1));var c,p,b=t["."],k=f.indexOf(b);k<0?(c=f,p=null):(c=f.substr(0,k),p=f.substr(k+b.length));var g=t[","];c=c.split(g).join("");var y=g.replace(/\u00A0/g," ");g!==y&&(c=c.split(y).join(""));var M=a+c;if(p!==null&&(M+="."+p),d!==null){var A=_(d,t,"-n");M+="e"+(A[0]||"+")+A[1]}ie.test(M)&&(i=parseFloat(M))}return i},h.culture=function(e){return typeof e!="undefined"&&(this.cultureSelector=e),this.findClosestCulture(e)||this.culture.default}})(this); diff --git a/src/Samples/Tests/Tests/Control/TextBoxTests.cs b/src/Samples/Tests/Tests/Control/TextBoxTests.cs index eddcfc4a07..0ee75c0481 100644 --- a/src/Samples/Tests/Tests/Control/TextBoxTests.cs +++ b/src/Samples/Tests/Tests/Control/TextBoxTests.cs @@ -166,7 +166,7 @@ public void Control_TextBox_StringFormat(string cultureName, string url, string AssertUI.InnerTextEquals(nullableNumberValueText, 123.123456789.ToString(culture)); var timespanTextbox = browser.First("#timespanTextbox"); - AssertUI.Attribute(timespanTextbox, "value", new TimeSpan(11, 48, 25).ToString("h\\:mm")); + AssertUI.Attribute(timespanTextbox, "value", new TimeSpan(11, 48, 25).ToString("hh\\:mm")); var timespanValueText = browser.First("#timespanValueText"); AssertUI.InnerTextEquals(timespanValueText, new TimeSpan(11, 48, 25).ToString()); @@ -186,14 +186,14 @@ public void Control_TextBox_StringFormat(string cultureName, string url, string //write invalid values dateTextBox.Clear().SendKeys("dsasdasd"); numberTextbox.Clear().SendKeys("000//a"); - timespanTextbox.Clear().SendKeys("10:23"); + timespanTextbox.Clear().SendKeys("08:23"); dateTextBox.Click(); //check displayed values (behavior change in 3.0 - previous values should stay there) AssertUI.InnerTextEquals(dateText, new DateTime(2018, 12, 27).ToString("G", culture)); AssertUI.InnerTextEquals(numberValueText, 2000.ToString(culture)); - AssertUI.InnerTextEquals(timespanTextbox, new TimeSpan(10, 23, 0).ToString("h\\:mm")); - AssertUI.InnerTextEquals(timespanValueText, new TimeSpan(10, 23, 0).ToString()); + AssertUI.InnerTextEquals(timespanTextbox, new TimeSpan(8, 23, 0).ToString("hh\\:mm")); + AssertUI.InnerTextEquals(timespanValueText, new TimeSpan(8, 23, 0).ToString()); AssertUI.Attribute(numberTextbox, "value", "000//a"); AssertUI.Attribute(dateTextBox, "value", "dsasdasd"); @@ -201,7 +201,7 @@ public void Control_TextBox_StringFormat(string cultureName, string url, string //write new valid values dateTextBox.Clear().SendKeys(new DateTime(2018, 1, 1).ToString("d", culture)); numberTextbox.Clear().SendKeys(1000.550277.ToString(culture)); - timespanTextbox.Clear().SendKeys(new TimeSpan(11, 48, 25).ToString("h\\:mm")); + timespanTextbox.Clear().SendKeys(new TimeSpan(11, 48, 25).ToString("hh\\:mm")); dateTextBox.Click(); //check new values @@ -221,9 +221,9 @@ public void Control_TextBox_StringFormat(string cultureName, string url, string AssertUI.Attribute(nullableDateTextBox, "value", new DateTime(2020, 4, 2).ToString("G", culture)); AssertUI.InnerTextEquals(nullableDateText, new DateTime(2020, 4, 2).ToString("G", culture)); - timespanTextbox.Clear().SendKeys(new TimeSpan(10, 23, 45).ToString("t", culture)).SendKeys(Keys.Tab); - AssertUI.InnerTextEquals(timespanTextbox, new TimeSpan(10, 23, 45).ToString("h\\:mm")); - AssertUI.InnerTextEquals(timespanValueText, new TimeSpan(10, 23, 45).ToString()); + timespanTextbox.Clear().SendKeys(new TimeSpan(22, 23, 45).ToString("t", culture)).SendKeys(Keys.Tab); + AssertUI.InnerTextEquals(timespanTextbox, new TimeSpan(22, 23, 45).ToString("hh\\:mm")); + AssertUI.InnerTextEquals(timespanValueText, new TimeSpan(22, 23, 45).ToString()); }); }