I'm trying to use to make a numericstepper control display two zeroes (00) instead of the single zero (0). I think the reason my current attempts using a DateFormatter are failing is because I'm trying to format a number as a string using formatString="NN", and the numeric stepper is just ignoring it, I guess. But I looked at the NumberFormatter, and didn't see anything useful other than precision (which is the wrong side of the decimal for my needs).
Here's the code I'm trying to use: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" initialize="Format();"> <mx:Script> <![CDATA[ import mx.events.NumericStepperEvent; import mx.controls.Alert; import mx.formatters.*; public function timeChange(event:NumericStepperEvent):void { if(event.target.id=="minutes") { if(event.target.value==60) { event.target.value=0; dateFormatter.format(event.target.value); } } } private function Format():void { dateFormatter.format(minutes.value); Alert.show(minutes.value.toString()); } ]]> </mx:Script> <mx:DateFormatter id="dateFormatter" formatString="NN" /> <mx:NumberFormatter id="numFormatter" rounding="none" /> <mx:NumericStepper id="minutes" height="20" value="0" stepSize="15" maximum="60" change="timeChange(event);" borderThickness="0" y="118" left="195" right="78" width="60"/> </mx:Application> Any help would be greatly appreciated. Best, Bruce -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/