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/18 03:57:15 UTC
[jira] [Commented] (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:comment-tabpanel&focusedCommentId=13634759#comment-13634759 ]
Justin Mclean commented on FLEX-23267:
--------------------------------------
May of been fixed by:
https://issues.apache.org/jira/browse/FLEX-23165
> 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