Revision: 4853
http://sourceforge.net/p/vexi/code/4853
Author: mkpg2
Date: 2016-04-01 04:03:15 +0000 (Fri, 01 Apr 2016)
Log Message:
-----------
Fix date picker regression. Could not select days 08/09 as value interpreted as
octal (and so not valid).
Modified Paths:
--------------
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datepicker.t
branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/util/digit.t
Modified:
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datepicker.t
===================================================================
---
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datepicker.t
2016-03-23 23:49:20 UTC (rev 4852)
+++
branches/vexi3/org.vexi-vexi.widgets/src_main/org/vexi/theme/classic/datepicker.t
2016-04-01 04:03:15 UTC (rev 4853)
@@ -161,21 +161,19 @@
}
if (olddate) {
- oldate.normal = true;
+ olddate.normal = true;
}
olddate = day ? $dategrid[showweekday+day-1] : null;
if (olddate and isCurrent(day)) {
- oldate.normal = true;
+ olddate.normal = true;
// olddate.fill = "darkblue";
// olddate[0].textcolor = "white";
}
}
/** trap to set selected date */
- var actionTrap = function(v) {
- var d = trapee[0].text;
- trace(d);
- day = d != " " ? d : null;
+ var actionTrap = function(v) {
+ day = trapee[0].number; // cannot use text, since 0N will be
interpreted as octal (and not work for 08/09)
year = day ? showyear : null;
month = day ? showmonth : null;
Modified: branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/util/digit.t
===================================================================
--- branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/util/digit.t
2016-03-23 23:49:20 UTC (rev 4852)
+++ branches/vexi3/org.vexi-vexi.widgets/src_main/vexi/util/digit.t
2016-04-01 04:03:15 UTC (rev 4853)
@@ -21,7 +21,7 @@
thisbox.text ++= static.textRead;
thisbox.text ++= static.textWrite;
thisbox.textcolor ++= static.forward;
-
+ thisbox.number ++= static.numberRead;
// initialize
fieldsize = 2;
digit = "0";
@@ -101,5 +101,20 @@
return;
}
+ static.numberRead = function(){
+ var ret = "";
+ var t = trapee;
+ for (var i=0; t.numchildren>i; i++) {
+ var c = t[i].text;
+ if(ret==""){
+ if(c==" ") continue;
+ if(c=="0") continue;
+ }
+ ret = ret + c;
+ }
+ return vexi.js.Number.tryParseString(ret);
+
+ };
+
</vexi>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn