Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 3.5 (Release)
-
Affected OS(s): All OS Platforms
Affected OS(s): All OS Platforms
Language Found: English
Description
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.