Re: [flexcoders] DateField cellRenderer not working with date as String

2006-07-21 Thread Ralf Bokelberg



Maybe it needs MM/TT/ ? Cheers,Ralf. On 7/21/06, John Buhl [EMAIL PROTECTED] wrote:



I stillget this error when I select the date, tab off of the cell, and return back to that cell. 
Type Coercion failed: cannot convert 04/13/2005 to Date

Is there something I am missing here?
Here is my code below:

mx:DataGrid draggableColumns=true id=dgVersions dataProvider={getVersionRequest.lastResult.root.versions.VersionHeader}mx:columnsmx:DataGridColumn itemEditor=RendererDate dataField=VERSIONACTIVEDATE headerText=Active Date width=100/
/mx:columns/mx:DataGrid

And this is my RendererDate.mxml component:
?xml version=1.0 encoding=utf-8?mx:DateField xmlns:mx=
http://www.adobe.com/2006/mxml mx:Script ![CDATA[
 private function getActiveDate( data : Object ) : Date { return new Date( Date.parse (data.VERSIONACTIVEDATE)); }  public override function set data( data : Object ) : void {
 super.data = ""> selectedDate = getActiveDate( data );  }  ]] /mx:Script/mx:DateField
On 7/20/06, Ralf Bokelberg 
[EMAIL PROTECTED] wrote:






Works for me, if i use the following external itemEditor ?xml version=1.0 encoding=utf-8?mx:DateField xmlns:mx=

http://www.adobe.com/2006/mxmlmx:Script![CDATA[ private function getActiveDate( data : Object ) : Date{ return new Date( 
Date.parse ( data.MyActiveDate));}public override function set data( data : Object ) : void{ super.data = ""> selectedDate = getActiveDate( data ); 
} ]]   /mx:Script   /mx:DateFieldcheers,Ralf. 

On 7/20/06, John Buhl 

[EMAIL PROTECTED] wrote: 



Yes. The data can be parsed fine. I think I need somehow to use a Model with my XML so I can massage the data first, and then set the dataProvider to the Model instead of the XML object. Still researching...




On 7/20/06, Tom Chiverton 

 [EMAIL PROTECTED] wrote: 
On Thursday 20 July 2006 15:53, John Buhl wrote: field comes across as text, so I'm trying to cast it into a Date object  before using the cellRenderer component.But it just won't work.Has
What format is the data string in ? Is it one Date can parse itself ?--Tom Chiverton This email is sent for and on behalf of Halliwells LLP.
Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF.A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. 
CONFIDENTIALITYThis email is intended only for the use of the addressee named above and may be confidential or legally privileged.If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. 
For more information about Halliwells LLP visit 

www.halliwells.com.  Yahoo! Groups Sponsor ~--Something is new at Yahoo! Groups.Check out the enhanced email design. 

http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM ~---Flexcoders Mailing ListFAQ: 

http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 

http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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/
-- ***John Buhl770-722-5209 (c)770-234-6710 (f) *** 


-- Ralf Bokelberg [EMAIL PROTECTED]

Flex  Flash Consultant based in Cologne/Germany 
 -- ***
John Buhl770-722-5209 (c)770-234-6710 (f)*** 




-- Ralf Bokelberg [EMAIL PROTECTED]Flex  Flash Consultant based in Cologne/Germany

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL 

[flexcoders] DateField cellRenderer not working with date as String

2006-07-20 Thread John Buhl



The DateField cellRenderer works great when your date is already a Date object. However, since I am dynamically reading in an XML file the date field comes across as text, so I'm trying to cast it into a Date object before using the cellRenderer component. But it just won't work. Has anyone run into this problem yet?


mx:DataGridColumn headerText=Active Date labelFunction=myLabelFunction width=100mx:itemEditor mx:Component mx:DateField editable=false selectedDate={new Date(
Date.parse(data.MyActiveDate))} / /mx:Component /mx:itemEditor/mx:DataGridColumn

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___



Re: [flexcoders] DateField cellRenderer not working with date as String

2006-07-20 Thread Tom Chiverton
On Thursday 20 July 2006 15:53, John Buhl wrote:
 field comes across as text, so I'm trying to cast it into a Date object
 before using the cellRenderer component.  But it just won't work.  Has

What format is the data string in ? Is it one Date can parse itself ?

-- 
Tom Chiverton



This email is sent for and on behalf of Halliwells LLP.

Halliwells LLP is a limited liability partnership registered in England and 
Wales under registered number OC307980 whose registered office address is at St 
James's Court Brown Street Manchester M2 2JF.  A list of members is available 
for inspection at the registered office. Any reference to a partner in relation 
to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law 
Society.

CONFIDENTIALITY

This email is intended only for the use of the addressee named above and may be 
confidential or legally privileged.  If you are not the addressee you must not 
read it and must not use any information contained in nor copy it nor inform 
any person other than Halliwells LLP or the addressee of its existence or 
contents.  If you have received this email in error please delete it and notify 
Halliwells LLP IT Department on 0870 365 8008.

For more information about Halliwells LLP visit www.halliwells.com.



 Yahoo! Groups Sponsor ~-- 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM
~- 

--
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/
 





Re: [flexcoders] DateField cellRenderer not working with date as String

2006-07-20 Thread John Buhl



Yes. The data can be parsed fine. I think I need somehow to use a Model with my XML so I can massage the data first, and then set the dataProvider to the Model instead of the XML object. Still researching...

On 7/20/06, Tom Chiverton [EMAIL PROTECTED] wrote:
On Thursday 20 July 2006 15:53, John Buhl wrote: field comes across as text, so I'm trying to cast it into a Date object
 before using the cellRenderer component.But it just won't work.HasWhat format is the data string in ? Is it one Date can parse itself ?--Tom Chiverton
This email is sent for and on behalf of Halliwells LLP.Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF.A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society.
CONFIDENTIALITYThis email is intended only for the use of the addressee named above and may be confidential or legally privileged.If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents.If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008.
For more information about Halliwells LLP visit www.halliwells.com. Yahoo! Groups Sponsor ~--Something is new at Yahoo! Groups.Check out the enhanced email design.
http://us.click.yahoo.com/SISQkA/gOaOAA/yQLSAA/nhFolB/TM~---
Flexcoders Mailing ListFAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txtSearch Archives: 
http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! 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/-- ***John Buhl770-722-5209 (c)770-234-6710 (f)
*** 

__._,_.___





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com








   






  
  
SPONSORED LINKS
  
  
  

Web site design development
  
  
Computer software development
  
  
Software design and development
  
  


Macromedia flex
  
  
Software development best practice
  

   
  







  
  
  YAHOO! GROUPS LINKS



  Visit your group "flexcoders" on the web.
  To unsubscribe from this group, send an email to:[EMAIL PROTECTED]
  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



  






__,_._,___