kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fix problem with sorting date fields
Introduced a couple of commits ago when the localeCompare() stuff was added.print-window-tiddler
rodzic
4758874d13
commit
89165fc51d
|
@ -309,6 +309,8 @@ exports.sortTiddlers = function(titles,sortField,isDescending,isCaseSensitive,is
|
|||
a = Number(a);
|
||||
b = Number(b);
|
||||
return isDescending ? b - a : a - b;
|
||||
} else if($tw.utils.isDate(a) && $tw.utils.isDate(b)) {
|
||||
return isDescending ? b - a : a - b;
|
||||
} else {
|
||||
a = String(a);
|
||||
b = String(b);
|
||||
|
|
Ładowanie…
Reference in New Issue