Saving state od daterange in localstorage doesn't work

Saving state od daterange in localstorage doesn't work

azomixazomix Posts: 1Questions: 0Answers: 0
edited August 2013 in DataTables 1.8
Hello,

I'm pretty new to datatables and I'm trying to store my filters in localstorage.
It works pretty well for all fields except date-range fields.

[code]
"bStateSave": true,
"fnStateSave": function (oSettings, oData) {
localStorage.setItem( 'DataTables_'+window.location.pathname, JSON.stringify(oData) );
},
"fnStateLoad": function (oSettings) {
return JSON.parse( localStorage.getItem('DataTables_'+window.location.pathname) );
}
[/code]

Is it because JSON.stringify is not able to serialize a date object ?

Thanks for your help.
This discussion has been closed.