3

Im new to backGrid and im very impressed with what it can do so far.

I have successfully got some data from my Database back to my web-app in JSON and all renders ok with the exception of a date column which will throws an error:

Object 1361561820000 has no method 'trim' Heres is the column:

var columns = [{
name: "dateTime",
label: "Date/Time",
cell: 'date'
}];

This will render ok on the page when cell is set to 'string' but obviously this doesnt display in date format..

Is there anyway around this?

Previously i used a standard html table and parsed the date column with: $.format.date(get('dateTime'), 'dd/MM/yyyy hh:mm:ss' but i seem unable to apply this now,

Any help much appreciated

user1694873
  • 473
  • 1
  • 11
  • 21

1 Answers1

2

All of the core datetime cells will only accept datetime values in ISO-8601 format. Timestamps are not supported. To make the datetime cells to accept UNIX timestamps, you will have to override the formatter.

Y.H Wong
  • 7,151
  • 3
  • 33
  • 35