Sorting table with Date using a Theme
Sorting table with Date using a Theme
I currently use this code to sort my dates but it will not sort the years correctly.
I have tried many of the suggestions here and they work but something is wrong and I loose my ThemeRoller theme, so I have something wrong. Can anyone help, I do a lot of cut and paste and lean as I go but have not grasped all the punctuation. I need to sort the date - MM-DD-YYYY format while displaying the ThemeRoller theme smoothness.
function fnFeaturesInit ()
{
/* Not particularly modular this - but does nicely :-) */
$('ul.limit_length>li').each( function(i) {
if ( i > 10 ) {
this.style.display = 'none';
}
} );
$('ul.limit_length').append( 'Show more<\/li>' );
$('ul.limit_length li.css_link').click( function () {
$('ul.limit_length li').each( function(i) {
if ( i > 5 ) {
this.style.display = 'list-item';
}
} );
$('ul.limit_length li.css_link').css( 'display', 'none' );
} );
}
$(document).ready( function() {
fnFeaturesInit();
$('#example').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 15,
"sLengthMenu": 25,
"aLengthMenu": [[15, 25, 50, 100, -1], [15, 25, 50, 100, "All"]],
"aaSorting": [[ 4, "desc" ]]
} );
SyntaxHighlighter.config.clipboardSwf = 'media/javascript/syntax/clipboard.swf';
SyntaxHighlighter.all();
} );
I have tried many of the suggestions here and they work but something is wrong and I loose my ThemeRoller theme, so I have something wrong. Can anyone help, I do a lot of cut and paste and lean as I go but have not grasped all the punctuation. I need to sort the date - MM-DD-YYYY format while displaying the ThemeRoller theme smoothness.
function fnFeaturesInit ()
{
/* Not particularly modular this - but does nicely :-) */
$('ul.limit_length>li').each( function(i) {
if ( i > 10 ) {
this.style.display = 'none';
}
} );
$('ul.limit_length').append( 'Show more<\/li>' );
$('ul.limit_length li.css_link').click( function () {
$('ul.limit_length li').each( function(i) {
if ( i > 5 ) {
this.style.display = 'list-item';
}
} );
$('ul.limit_length li.css_link').css( 'display', 'none' );
} );
}
$(document).ready( function() {
fnFeaturesInit();
$('#example').dataTable( {
"bJQueryUI": true,
"sPaginationType": "full_numbers",
"iDisplayLength": 15,
"sLengthMenu": 25,
"aLengthMenu": [[15, 25, 50, 100, -1], [15, 25, 50, 100, "All"]],
"aaSorting": [[ 4, "desc" ]]
} );
SyntaxHighlighter.config.clipboardSwf = 'media/javascript/syntax/clipboard.swf';
SyntaxHighlighter.all();
} );
This discussion has been closed.