Quantcast
Channel: DataTables 1.9 — DataTables forums
Viewing all articles
Browse latest Browse all 1816

Blanks in date column causes string sort - continued

$
0
0
Referring to http://www.datatables.net/forums/discussion/4904/blanks-in-the-date-column-causes-string-sort/p1,

when I use a custom date sorting function via a type detection (dynamic columns cannot set predefined type), the sorting function is still switching to string, when there is no value in a table cell, yet there are some HTML tags in the cell.

ie
 <td><center></center></td>

The solution in the original case consists of setting the detected type to undefined for blank cells, is this something I can do from my type detection function as well? I tried to return "undefined", yet that does not work.

		var sInput = sData.replace(/<[^>]+>/g,'');
		if (sInput.length == 0) {
			return undefined;
		}

Is there a way to tell from the type detection function to stop detection on this cell and move on to the next, hence preventing a string match caused by the html tags?

Viewing all articles
Browse latest Browse all 1816

Trending Articles