From the Java server side, I am receiving a date in milliseconds that I need to convert into a JavaScript Date
object:
long s = 1523357477; // At the Java end
var v= new Date(1523357477); //At the Javascript ExtJS end
However, the output is:
Sun Jan 18 1970 20:39:12 GMT+0530 (India Standard Time)
This is incorrect because in the ExtJS grid panel, the same date gets converted to:
10-04-2018 14:23
Below is the code snippet for the ExtJS grid columns. The key functionality lies within Ext.util.Format.dateRenderer
{
headerId: 'column-creation-date',
dataIndex: 'creationDate',
text: 'Created at',
renderer: Ext.util.Format.dateRenderer,
width: 155,
filter: true
}