Sort a tableview column containing a date
936800Jun 23 2012 — edited Jun 24 2012This is my second request to find more info on handling dates javafx2, no replies to the first so am trying again.
I am a relative "newby" to java, FX2 has so many compelling features I really want to use it.
Displaying and sorting on dates seems like such a fundamental requirement that I am surprised that I can't find any examples anywhere on handing dates in a tableview.
This would be so easy to do in Cocoa with the "date formatter" so apologies if I am missing something obvious.
If I use a formatted date the column sorts on the text not on the actual date.
eg. starting with
06/01/2012
08/01/2011
07/01/2012
sorting ascending gives
06/01/2012
07/01/2012
08/01/2011
and descending
08/01/2011
07/01/2012
06/01/2012
both wrong!
Same issue if I use a calendar in the cells.
Hope the answer is not to have a separate column for day, month and year.