开发者

Does YUI allow you to sort dates in a datatable?

开发者 https://www.devze.com 2023-01-14 23:37 出处:网络
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

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

精彩评论

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