flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William Page (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FLEX-33658) Using the mx:DateFormatter in Actionscript no longer produces the same results
Date Thu, 08 Aug 2013 18:29:47 GMT
William Page created FLEX-33658:
-----------------------------------

             Summary: Using the mx:DateFormatter in Actionscript no longer produces the same
results
                 Key: FLEX-33658
                 URL: https://issues.apache.org/jira/browse/FLEX-33658
             Project: Apache Flex
          Issue Type: Bug
          Components: Advanced Data Grid
    Affects Versions: Apache Flex 4.10.0
            Reporter: William Page



Here is the code…

			var j:int = 0;
			for (i=minNum;i<length;i++)  {   
				oColumnDef = new AdvancedDataGridColumn();
				oColumnDef.headerText = MonthDisplay(modelLocator.aryMonths.getItemAt(i).begDate);

				oColumnDef.dataField = "s"+[j+1];
				oColumnDef.width = 100;
				oColumnDef.labelFunction=dgCurFormat12
				oColumnDef.setStyle("textAlign","right")
				colArray.push(oColumnDef);
				j=j+1;
			}


			private function MonthDisplay(item:String):String{		
				var df:DateFormatter = new DateFormatter()
				df.formatString="MMM-YYYY";
				return df.format(item);  		
			}	

aryMonths contains dates like these ('07/01/2013', '06/01/2013', '05/01/2013', '04/01/2013',
'03/01/2013', etc)

The header text ends up showing Jan-2013,  Jan-2013,  Jan-2013,  Jan-2013,  Jan-2013 etc)

It seems that the DateFormatter is reading the date in reverse order Day-Month-Year when applying
the format…Versus Month-Day-Year…Is there a way to resolve this without rewriting all
my database scripts to reformat dates?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message