I should say that I've got this (below) working OK so far (couple of tweeks needed)


the 3 things to do is
 - combine the dateField and dateFormatter controls
 - pass in the format string
and the tough bit
 - switch between using DataGridListData(listData) ... or not...(depending on how the control is used)


                <mx:DataGridColumn dataField="EndEval" editable="true"  width="100"
                                      headerWordWrap="true" headerText="End Evaluation"
                                    rendererIsEditor="true"
                                     editorDataField="selectedDate">
                         <mx:itemRenderer>
                          <mx:Component>
                          <mx:DateField editable="true" labelFunction="formatDate" parseFunction="myParseFunction">
                           <mx:DateFormatter id="dfconv" formatString="DD/MM/YYYY">
                            <mx:Script>
                                <![CDATA[
                                    private function formatDate(date:Date):String{
                                        return dfconv.format(date);
                                    }
                                   
                                    public function myParseFunction( inputString : String,
                                        formatString : String = "DD/MM/YYYY") : Date {
                                        if (inputString == "") {
                                            return null;
                                        }
                                       
                                        var year : Number = Number(inputString.substr(6,4));
                                        var month : Number = Number( inputString.substr(3,2)) - 1;
                                        var day : Number = Number(inputString.substr(0,2));
                                        var date : Date = new Date(year,month,day);
                                        return date;
                                    }      
                                ]]>
                            </mx:Script>                  
                           </mx:DateFormatter>   
                           </mx:DateField>
                          </mx:Component>
                         </mx:itemRenderer>                      
               </mx:DataGridColumn>


__._,_.___


SPONSORED LINKS
Software development tool Application development software Development software
Development outsourcing software Embedded software development

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to