In docman, the sorting by dates doesn't work. The sorting is alphabetical, so it's not OK with french date format.
It's not expected that dates are on JJ/MM/AAAA HH:MM format in "sortable.js" file. (but only JJ/MM/AAAA, without hours and minutes)
A possible correction in "src/www/js/sortable.js" file:
Add in "ts_resortTable" function this test :
if (itm.match("^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[012])/[0-9]{4} ([01][0-9]|2[0-3]):([0-5][0-9])$")) sortfn = tssortdate;
Add in "sort_date" function this code :
else if (date.length == 16) {
if (europeandate == false) {
dt = date.substr(6,4)+date.substr(0,2)+date.substr(3,2)+date.substr(11,5);
return dt;
} else {
dt = date.substr(6,4)+date.substr(3,2)+date.substr(0,2)+date.substr(11,5);
return dt;
}
}
|