0 Replies Latest reply on Aug 22, 2006 4:53 PM by amers

    Edit Date with DataGrid

    amers Level 1
      I have a question in regards to editing a date in a DataGrid.

      I have this code:

      <mx:DataGrid id="memberGrid" width="480" height="140" editable="true">
      <mx:columns>
      <mx:DataGridColumn textAlign="left" dataField="fullName" headerText="Name"/>
      <mx:DataGridColumn labelFunction="formatDate" headerText="Start Date" itemRenderer="mx.controls.DateField" editorDataField="selectedDate"/>
      </mx:columns>
      </mx:DataGrid>

      Where the labelFunction calls a function to edit and format a date (dd-mmm-yyyy), which works fine - but then I'd like to edit the date using the DateField. I know that it needs to be a date, but how does one do this? Do I need to create a custom itemrenderer to do this? When I use the DateField, the format of the date is funky and it doesn't show the correct date - unless I pick a new date.

      thanks!