I have the dateField in an exitable Flex component within a DataGrid.
 The field is empty and when I hit the dateField I get the error.

timgerr

--- In [email protected], "Fotis Chatzinikos"
<[EMAIL PROTECTED]> wrote:
>
> are you passing an empty string as a date?
> 
> >> cannot convert "" to Date
> 
> On Thu, Nov 20, 2008 at 5:32 PM, timgerr <[EMAIL PROTECTED]> wrote:
> 
> >   TypeError: Error #1034: Type Coercion failed: cannot convert ""
to Date.
> > at mx.controls::DateField/set
> >
> >
data()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DateField.as:735]
> > at
> >
> >
mx.controls::DataGrid/itemEditorItemEditBeginHandler()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:4755]
> > at flash.events::EventDispatcher/dispatchEventFunction()
> > at flash.events::EventDispatcher/dispatchEvent()
> > at
> >
> >
mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
> > at
> >
> >
mx.controls::DataGrid/commitEditedItemPosition()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:3676]
> > at
> >
> >
mx.controls::DataGrid/updateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\DataGrid.as:1498]
> > at
> >
> >
mx.controls.listClasses::ListBase/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\controls\listClasses\ListBase.as:3281]
> > at
> >
> >
mx.managers::LayoutManager/validateDisplayList()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:602]
> > at
> >
> >
mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:675]
> > at Function/http://adobe.com/AS3/2006/builtin::apply()
> > at
> >
> >
mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
> > at
> >
> >
mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]
> > at flash.utils::Timer/_timerDispatch()
> > at flash.utils::Timer/tick()
> >
> >
> > --- In [email protected] <flexcoders%40yahoogroups.com>, Alex
> > Harui <aharui@> wrote:
> > >
> > > Please use a debug build and post the complete stacktrace.
> > >
> > > From: [email protected] <flexcoders%40yahoogroups.com>
[mailto:
> > [email protected] <flexcoders%40yahoogroups.com>]
> > On Behalf Of timgerr
> > > Sent: Wednesday, November 19, 2008 8:46 AM
> > > To: [email protected] <flexcoders%40yahoogroups.com>
> > > Subject: [flexcoders] Re: Error #1034: Type Coercion failed: cannot
> > convert "" to Date w/ Datagrid
> > >
> > >
> > > Alex thanks for the reply, I am still getting the same error.
> > >
> > > timgerr
> > >
> > > --- In
> > [email protected] <flexcoders%40yahoogroups.com><mailto:
> > flexcoders%40yahoogroups.com <flexcoders%2540yahoogroups.com>>, Alex
> > Harui <aharui@> wrote:
> > > >
> > > > editorDataField="selectedDate"
> > > >
> > > > From:
> > [email protected] <flexcoders%40yahoogroups.com><mailto:
> > flexcoders%40yahoogroups.com <flexcoders%2540yahoogroups.com>>
> > [mailto:[email protected]
<flexcoders%40yahoogroups.com><mailto:
> > flexcoders%40yahoogroups.com <flexcoders%2540yahoogroups.com>>]
> > > On Behalf Of timgerr
> > > > Sent: Tuesday, November 18, 2008 9:32 PM
> > > > To: [email protected]
<flexcoders%40yahoogroups.com><mailto:
> > flexcoders%40yahoogroups.com <flexcoders%2540yahoogroups.com>>
> > > > Subject: [flexcoders] Error #1034: Type Coercion failed: cannot
> > > convert "" to Date w/ Datagrid
> > > >
> > > >
> > > > Hello all,
> > > > I am trying to add a datefield to a datagrid using a itemEditor. I
> > > > have seen that people are having this problem but I canot find a
> > > > solution (That I understand). Has anyone ever had this problem and
> > > > what did you do to solve it. Here is my code:
> > > >
> > > > <mx:DataGrid id="CertDG" width="528" height="60%" editable="true">
> > > > <mx:columns>
> > > > <mx:DataGridColumn headerText="Name" dataField="cert_name"/>
> > > > <mx:DataGridColumn headerText="Issuer" dataField="issuer"/>
> > > > <mx:DataGridColumn headerText="Achieved"
> > > > dataField="date_achieved" editorDataField="text">
> > > > <mx:itemEditor>
> > > > <mx:Component>
> > > > <mx:DateField formatString="DD-MM-YY"
> > > > yearNavigationEnabled="true" toolTip="Format:DD-MM-YY"/>
> > > > </mx:Component> </mx:itemEditor>
> > > > </mx:DataGridColumn>
> > > > </mx:columns>
> > > > </mx:DataGrid>
> > > >
> > > > Thanks for the read,
> > > > timgerr
> > > >
> > >
> >
> >  
> >
> 
> 
> 
> -- 
> Fotis Chatzinikos, Ph.D.
> Founder,
> Phinnovation
> [EMAIL PROTECTED],
>


Reply via email to