Reputation: 24025
Is there a way to sort dates in yui without having to define your own sorting implementation?
Upvotes: 1
Views: 809
Reputation: 10333
Yes they do. However, you have to use date objects and define the column as type date in your dataset. I have found an easier way is to put your dates in to the data set as strings in the following format
2010-04-10
This will allow you to use the default string sorting function and it will sort the dates properly. Then just put a formatter on that same column to format the date however you like.
Upvotes: 3