fcarcillo
Forum Replies Created
-
Forum: Plugins
In reply to: WP-Table Reloaded Date Sort dd.mm.yySimply said…
following your instructions
1)i set up js file (date-sorting.js) copying (in this order) sorting#date_euro_full and type-detection#uk_date in folder wp-tabel-preloaded-extensions in wp-content/plugins
2) build up a wp-tale-reloaded-extensions.php, copying the code inside the template following your example in extensions page doc.
3) plugin activaded
4) the sorting order in my date column is still mm/dd/yyyy (note all the column header have theirs arrows, and the sorting functions are working), and also note i have 4-digit in yyyy
5) i tried to join in date-sorting.js only the Andy MacMaster snippets, i.e. this one (instead of euro_full) and type-detection#uk_datejQuery.fn.dataTableExt.oSort[‘uk_date-asc’] = function(a,b) {
var ukDatea = a.split(‘/’);
var ukDateb = b.split(‘/’);var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1;return ((x < y) ? -1 : ((x > y) ? 1 : 0));
};jQuery.fn.dataTableExt.oSort[‘uk_date-desc’] = function(a,b) {
var ukDatea = a.split(‘/’);
var ukDateb = b.split(‘/’);var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1;return ((x < y) ? 1 : ((x > y) ? -1 : 0));
};——————————————
still having the same results (mm/dd/yyyy).
Could be that these snippets dont work when YYYY?
Any help?
FrancoForum: Plugins
In reply to: WP-Table Reloaded Date Sort dd.mm.yySorry Tobias for bothering you but having:
1)set up a wp-table-reloaded-extensions folder unter wp-content/plugins
2) joined the date_euro_full and type-detection#uk_date[moderator note: snipped code, please use https://wordpress.pastebin.ca ]
8) any help?