From 65832cf8568801982a620e8fc006caf57519fafb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sedov=C5=A1ek?= Date: Wed, 26 Feb 2014 20:09:16 +0100 Subject: [PATCH 1/2] Bug: Plugin used to break on empty strings. Someone reported an issue about this plugin. I'm publishing a fix here so others can benefit as well. --- sorting/date-eu.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sorting/date-eu.js b/sorting/date-eu.js index 1f9c280..ed0dd38 100644 --- a/sorting/date-eu.js +++ b/sorting/date-eu.js @@ -19,6 +19,8 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { "date-eu-pre": function ( date ) { date = date.replace(" ", ""); var eu_date, year; + + if (date == '') return; if (date.indexOf('.') > 0) { /*date a, format dd.mn.(yyyy) ; (year is optional)*/ From 6808532e34503b73431398c354639d8a5ceec237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sedov=C5=A1ek?= Date: Wed, 26 Feb 2014 22:44:18 +0100 Subject: [PATCH 2/2] Update date-eu.js --- sorting/date-eu.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sorting/date-eu.js b/sorting/date-eu.js index ed0dd38..9fc6d4f 100644 --- a/sorting/date-eu.js +++ b/sorting/date-eu.js @@ -20,7 +20,7 @@ jQuery.extend( jQuery.fn.dataTableExt.oSort, { date = date.replace(" ", ""); var eu_date, year; - if (date == '') return; + if (date == '') return 0; if (date.indexOf('.') > 0) { /*date a, format dd.mn.(yyyy) ; (year is optional)*/