Updated Branches:
  refs/heads/develop 5e6e5c36c -> c9558c25e

FLEX-21609 Changed set data to use internal/user defined date parse function 
when specified rather than Date.parse


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

Branch: refs/heads/develop
Commit: c9558c25e604e45fe25519543243e8ed187dec0e
Parents: 5e6e5c3
Author: Justin Mclean <[email protected]>
Authored: Sat Apr 20 13:23:59 2013 +1000
Committer: Justin Mclean <[email protected]>
Committed: Sat Apr 20 13:23:59 2013 +1000

----------------------------------------------------------------------
 .../projects/mx/src/mx/controls/DateField.as       |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-sdk/blob/c9558c25/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 e6eab28..a9e86bd 100644
--- a/frameworks/projects/mx/src/mx/controls/DateField.as
+++ b/frameworks/projects/mx/src/mx/controls/DateField.as
@@ -837,7 +837,10 @@ public class DateField extends ComboBase
         else if (_listData is ListData && ListData(_listData).labelField in 
_data)
             newDate = _data[ListData(_listData).labelField];
         else if (_data is String)
-            newDate = new Date(Date.parse(data as String));
+                       if (_parseFunction != null)
+                   newDate = _parseFunction(data as String, formatString);
+                       else
+                               newDate = new Date(Date.parse(data as String));
         else
             newDate = _data as Date;
 

Reply via email to