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

Justin Mclean updated FLEX-23267:
---------------------------------

    Labels: easytest  (was: )
    
> DateField, impossible to change a date after being invalid.
> -----------------------------------------------------------
>
>                 Key: FLEX-23267
>                 URL: https://issues.apache.org/jira/browse/FLEX-23267
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: DateField
>    Affects Versions: Adobe Flex SDK 3.5 (Release)
>         Environment: Affected OS(s): All OS Platforms
> Affected OS(s): All OS Platforms
> Language Found: English
>            Reporter: Adobe JIRA
>              Labels: easytest
>
> Steps to reproduce:
> 1. Create an invalid Date. Like date = new Date("01/01/AAAA");
> 2. Affect this date to a DateField. dateField.selectedDate = date.
> 3. You will never be able to change the date of this DateField anymore.
> Why?
> DateField now compares the date if it changes.
>     public function set selectedDate(value:Date):void
>     {
>         if (ObjectUtil.dateCompare(_selectedDate, value) == 0) 
>             return;
>      ....
>     }
> Since the Date is invalid, all fields are NaN.
> ObjectUtil dateCompare will take the getTime() wich will return NaN.
> The NaN comparator with a Number is always returning false, so the compare 
> will always return 0. And you will never be able to change the selectedDate.

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