Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-23267

DateField, impossible to change a date after being invalid.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK 3.5 (Release)
    • Apache Flex 4.10.0
    • mx: DateField
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            adobejira Adobe JIRA
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: