0 Replies Latest reply on Aug 10, 2007 3:54 AM by fragerdaz

    dateField won't accept YYYY-MM-DD

    fragerdaz
      quote:

      [Bindable]
      private var dDate:Date;

      private function setDate():void {
      sDate = "2007-08-10";
      dDate = new Date(sDate);
      }

      [...]

      <mx:DateField
      id="dfCompleted"
      formatString="YYYY-MM-DD"
      text="{dDate}"/>


      Although the date appears in the YYYY-MM-DD format when I pick a date from the calendar, the dateField indicates "Invalid date" when I try to load a date with the bound variable.

      What am I doing wrong?

      BTW... "Invalid date" does not appear in the documented errors (Using the DateFormatter class (Flex 2 Developer's Guide ))