« Return to Thread: Date formatting and sorting?

Date formatting and sorting?

by Christian Cypert-4 :: Rate this Message:

Reply to Author | View in Thread

I've got a grid where I'm needing to format and sort a date field, but  
running into several issues. If I do a simple render function as  
follows:

renderer:Ext.util.Format.dateRenderer('m/d/Y')

This works OK, but if I have an empty date field I get "NaN/NaN/NaN"  
for the field, and the sort does not appear to work in date order.  
It's wanting to sort the field as if it where an alpha.

The date field is defined simply as

fields :[
'due'
]

I've also tried {name:'due', type:'date', dateFormat:'n/j h:ia'}, but  
this causes errors on my end. The grid does not display any data if I  
define it as such.

Thanks,

Christian Cypert
ccypert@...

It is a rare mind indeed that can render the hitherto non-existent  
blindingly obvious. The cry 'I could have thought of that' is a very  
popular and misleading one, for the fact is that they didn't, and a  
very significant and revealing fact it is too.
- Douglas Adams





_______________________________________________
Active4D-dev mailing list
Active4D-dev@...
http://mailman.aparajitaworld.com/mailman/listinfo/active4d-dev
Archives: http://mailman.aparajitaworld.com/archive/active4d-dev/

 « Return to Thread: Date formatting and sorting?