flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmcl...@apache.org
Subject [7/8] git commit: [flex-sdk] [refs/heads/release4.11.0] - FLEX-33823 fixed parsing of month strings in stringToDate
Date Tue, 15 Oct 2013 23:39:06 GMT
FLEX-33823 fixed parsing of month strings in stringToDate


Project: http://git-wip-us.apache.org/repos/asf/flex-sdk/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-sdk/commit/ba846c44
Tree: http://git-wip-us.apache.org/repos/asf/flex-sdk/tree/ba846c44
Diff: http://git-wip-us.apache.org/repos/asf/flex-sdk/diff/ba846c44

Branch: refs/heads/release4.11.0
Commit: ba846c4478d78f131387f9cc7561280c40ef963b
Parents: c556895
Author: Justin Mclean <jmclean@apache.org>
Authored: Wed Oct 16 09:50:03 2013 +1100
Committer: Justin Mclean <jmclean@apache.org>
Committed: Wed Oct 16 09:50:03 2013 +1100

----------------------------------------------------------------------
 frameworks/projects/mx/src/mx/controls/DateField.as | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/ba846c44/frameworks/projects/mx/src/mx/controls/DateField.as
----------------------------------------------------------------------
diff --git a/frameworks/projects/mx/src/mx/controls/DateField.as b/frameworks/projects/mx/src/mx/controls/DateField.as
index 6318633..6d45041 100644
--- a/frameworks/projects/mx/src/mx/controls/DateField.as
+++ b/frameworks/projects/mx/src/mx/controls/DateField.as
@@ -475,10 +475,19 @@ public class DateField extends ComboBase
 		if (valueString == null || inputFormat == null)
 			return null;
 		
+		var monthNames:Array = ResourceManager.getInstance()
+			.getStringArray("SharedResources", "monthNames");
+		
+		var noMonths:int = monthNames.length;
+		for (var i:int = 0; i < noMonths; i++) {
+			valueString = valueString.replace(monthNames[i], (i+1).toString());
+			valueString = valueString.replace(monthNames[i].substr(0,3), (i+1).toString());
+		}
+		
 		length = valueString.length;
 		
 		dateParts[part] = "";
-        for (var i:int = 0; i < length; i++)
+        for (i = 0; i < length; i++)
         {
 			dateChar = valueString.charAt(i);
  


Mime
View raw message