开发者

Does YUI allow you to sort dates in a datatable?

Is there a way to sort dates in yui without having to define your own sorting impl开发者_JAVA技巧ementation?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜