diff options
Diffstat (limited to 'web/app/view')
-rw-r--r-- | web/app/view/report/Report.js | 10 | ||||
-rw-r--r-- | web/app/view/state/StateController.js | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/web/app/view/report/Report.js b/web/app/view/report/Report.js index 535be942b..8b86b9cc7 100644 --- a/web/app/view/report/Report.js +++ b/web/app/view/report/Report.js @@ -44,23 +44,27 @@ Ext.define('Traccar.view.report.Report', { }, { xtype: 'datefield', reference: 'fromDateField', - value: new Date() + startDay: styles.weekStartDay, + value: new Date(new Date().getTime() - 30 * 60 * 1000) }, { xtype: 'timefield', reference: 'fromTimeField', maxWidth: styles.reportTime, - value: new Date() + format: styles.timeFormat, + value: new Date(new Date().getTime() - 30 * 60 * 1000) }, '-', { xtype: 'tbtext', html: strings.reportTo }, { xtype: 'datefield', reference: 'toDateField', + startDay: styles.weekStartDay, value: new Date() }, { xtype: 'timefield', reference: 'toTimeField', maxWidth: styles.reportTime, + format: styles.timeFormat, value: new Date() }, '-', { text: strings.reportShow, @@ -76,7 +80,7 @@ Ext.define('Traccar.view.report.Report', { columns: [ { text: strings.positionValid, dataIndex: 'valid', flex: 1 }, - { text: strings.positionTime, dataIndex: 'fixTime', flex: 1, xtype: 'datecolumn', format: styles.reportFormat }, + { text: strings.positionTime, dataIndex: 'fixTime', flex: 1, xtype: 'datecolumn', format: styles.dateTimeFormat }, { text: strings.positionLatitude, dataIndex: 'latitude', flex: 1 }, { text: strings.positionLongitude, dataIndex: 'longitude', flex: 1 }, { text: strings.positionAltitude, dataIndex: 'altitude', flex: 1 }, diff --git a/web/app/view/state/StateController.js b/web/app/view/state/StateController.js index 73dc28b50..c027dddc9 100644 --- a/web/app/view/state/StateController.js +++ b/web/app/view/state/StateController.js @@ -96,6 +96,8 @@ Ext.define('Traccar.view.state.StateController', { var speedUnits = Ext.getStore('SpeedUnits'); unit = Traccar.getApplication().getUser().get('speedUnit') || Traccar.getApplication().getServer().get('speedUnit') || ''; value = speedUnits.convert(value, unit) + ' ' + speedUnits.getUnitName(unit); + } else if (value instanceof Date) { + value = Ext.Date.format(value, styles.dateTimeFormat); } store.add(Ext.create('Traccar.model.Parameter', { |