You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by "Justin Mclean (JIRA)" <ji...@apache.org> on 2013/04/19 05:53:18 UTC

[jira] [Resolved] (FLEX-23267) DateField, impossible to change a date after being invalid.

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

Justin Mclean resolved FLEX-23267.
----------------------------------

       Resolution: Fixed
    Fix Version/s: Apache Flex 4.10.0

Fix to ObjectUtil fixed this.
                
> 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
>             Fix For: Apache Flex 4.10.0
>
>
> 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