I have a date field that when treated like a string displays in the form:
Apr 01 13 07:28:00 AM
I defined the field as a date as below
datafields: [
{ name: 'location_id', type: 'string'},
{ name: 'location_description', type: 'string'},
{ name: 'location_type', type: 'string'},
{ name: 'accuracy_score', type: 'float'},
<strong> { name: 'audit_open_date', type: 'date' },</strong><ul>
{ name: 'audit_template', type: 'string'},
{ name: 'inventory_user_name', type: 'string'}
],
And the columns as follows
columns: [
{ text: 'Location Name', datafield: 'location_id', width: '12%' },
{ text: 'Location Description', datafield: 'location_description', width: '20%' },
{ text: 'Location Type', datafield: 'location_type', width: '12%' },
{ text: 'Accuracy Score', datafield: 'accuracy_score', width: '12%' },
<strong> { text: 'Audit Open Date', datafield: 'audit_open_date', cellsformat: 'MMM DD yy HH:mm:ss tt', width: '12%' },</strong></ul>
But it still seems to be sorting it as a string as April 2nd of 2013 comes after April 1st of 2014. Any thoughts?
Sorting ints and strings has worked fine so far.
{ text: ‘Audit Template’, datafield: ‘audit_template’, width: ‘15%’ },
{ text: ‘Cell Technician’, datafield: ‘inventory_user_name’, width: ‘17%’ }
]