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

Enhance DateFormatter to support custom string like "YY Years MM Months DD Days"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Reopened
    • Minor
    • Resolution: Unresolved
    • Adobe Flex SDK 3.0 (Release)
    • None
    • Formatters
    • Affected OS(s): All OS Platforms
      Language Found: English

    Description

      Run the following application, Pick a date in the date field, you will see the label output will be something like "08 years 10 months 22 days"
      Notice the format string is "YY years MM months DD days". However, if we change this to "YY Years MM Months DD Days", the dateformatter will fail to output anything.

      <?xml version="1.0" encoding="utf-8"?>
      <!-- Simple example to demonstrate the DateField control. -->
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

      <mx:DateFormatter id="df" formatString="YY years MM months DD days"/>

      <mx:Panel title="DateField Control Example" height="75%" width="75%"
      paddingTop="10" paddingLeft="10" paddingRight="10">

      <mx:Label text="Disable dates on or before June 1, 2006."/>
      <mx:DateField id="dateField2" yearNavigationEnabled="true"
      disabledRanges="{[

      {rangeEnd: new Date(2006, 5, 1)}

      ]}" />
      <mx:Label color="blue" text="Date selected:

      {df.format(dateField2.selectedDate)}

      "/>

      </mx:Panel>
      </mx:Application>

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: