[ 
https://issues.apache.org/jira/browse/FLEX-14581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Justin Mclean resolved FLEX-14581.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Apache Flex 4.10.0

Checked into develop branch.
                
> Mx.Controls.DateChooser - Setting .monthNames to Array of Length < 12 causes 
> "Null" months
> ------------------------------------------------------------------------------------------
>
>                 Key: FLEX-14581
>                 URL: https://issues.apache.org/jira/browse/FLEX-14581
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: DateChooser
>    Affects Versions: Adobe Flex SDK Previous
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Browser: Internet Explorer 7.x
> Language Found: English
>            Reporter: Adobe JIRA
>            Priority: Minor
>              Labels: easyfix, easytest
>             Fix For: Apache Flex 4.10.0
>
>
> The dateChooser displays a month name of "null" when iterating through the 
> monthNames array at an index that has no value.
> #########################
> Sample APP
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"; layout="absolute">
>       <mx:DateChooser 
>               x="10" 
>               y="10"
>               monthNames="[Jan]"/>
> </mx:Application>
> #########################
> Steps to reproduce:
> 1. Start the app when today's date is NOT in January.
> 2. Look at the displayed Month name in the chooser.
>  
>  Actual Results:
>  The chooser displays with a header of "null <YEAR>".
>  
>  Expected Results:
>  Only the months in the .monthNames[ ] can be displayed when selecting the 
> '<-' and '->' buttons.
>  
> #########################
>  Workaround/FIX:
>  
> Modify the 'updateDateDisplay()' method, change the following at line 2531:
> // monthNames will be null if there are no resources.
> var monthName:String = monthNames ? monthNames[dateGrid.displayedMonth] :
> To:
> // display the month int value when a name is not available
> var monthName:String = (new Date()).getMonth().toString();
> if ((monthNames == null) || (monthNames[dateGrid.displayedMonth] != null)
> {
>      monthName = monthNames[dateGrid.displayedMonth] ;
> }

--
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

Reply via email to