I am looking to format my incoming dates but don't see a suitable way without changing my incoming JSON (which I have standardized on passing as 'time since epoch', new Date().valueOf() ).
Sample Grid Row JSON segment:
Columns list object:
My understanding is that the format attribute defined above will specify the output format, however I don't know how to specify a way to accept the incoming milliseconds from epoch as a date object without some interceptor layer injecting itself into the consumption of the JSON.
I would be fine to have a event attached to the datasource in use here and have it mutate the long value into a date object if there isn't a more elegant way to achieve this.
Sample Grid Row JSON segment:
{
"received_date"
:1381331366000},
{
"format"
:
"{0: yyyy-MM-dd HH:mm:ss}"
,
"field"
:
"received_date"
,
"title"
:
"Received"
},
I would be fine to have a event attached to the datasource in use here and have it mutate the long value into a date object if there isn't a more elegant way to achieve this.