topical media & game development

talk show tell print

professional-flex-code-09-SimpleFormatter.mx

professional-flex-code-09-SimpleFormatter.mx [swf] flex


  <?xml version="1.0" encoding="utf-8"?>
  <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
     backgroundColor="#FFFFFF" width="500" height="280">
  
    <mx:DateFormatter id="dateFormatShort" formatString="MM/DD/YY"/>
    <mx:DateFormatter id="dateFormatMedium" formatString="MMM DD, YY"/>
    <mx:DateFormatter id="dateFormatFull" formatString="MMMM DD, YYYY"/>
  
          <mx:Panel title="Simple Formatter"
                  layout="horizontal" width="100%" height="100%">
      <mx:DateChooser id="cal" />
      
      <mx:VBox>
              <mx:Label text="{cal.selectedDate}"/> 
        <mx:Label text="{dateFormatShort.format(cal.selectedDate)}"/> 
        <mx:Label text="{dateFormatMedium.format(cal.selectedDate)}"/> 
        <mx:Label text="{dateFormatFull.format(cal.selectedDate)}"/> 
                  </mx:VBox>
      
          </mx:Panel>
  </mx:Application>


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.