sSortDataType with timepicker
sSortDataType with timepicker

Hi,
It's my first post here..
Anyone does a "sSortDataType" when use textfield with timepicker ?
The sort not happened becouse the column is order how string not a date.
[code]
$.fn.dataTableExt.afnSortData['dom-text'] = function ( oSettings, iColumn )
{
var aData = [];
$( 'td:eq('+iColumn+') input', oSettings.oApi._fnGetTrNodes(oSettings) ).each( function () {
aData.push( this.value );
} );
return aData;
}
[/code]
Thanks..
It's my first post here..
Anyone does a "sSortDataType" when use textfield with timepicker ?
The sort not happened becouse the column is order how string not a date.
[code]
$.fn.dataTableExt.afnSortData['dom-text'] = function ( oSettings, iColumn )
{
var aData = [];
$( 'td:eq('+iColumn+') input', oSettings.oApi._fnGetTrNodes(oSettings) ).each( function () {
aData.push( this.value );
} );
return aData;
}
[/code]
Thanks..
This discussion has been closed.
Replies
I change the form of the datatable was rendering and then corrected the column order.