Recreate frontend for correct date #4660

This commit is contained in:
James Cole
2021-04-15 06:39:07 +02:00
parent 0ea22269a0
commit e5b4e7afe0
5 changed files with 18 additions and 17 deletions

View File

@@ -138,8 +138,9 @@ export default {
let type = parts[parts.length - 1];
// set a basic date-time string:
let date = new Date;
this.date = [date.getFullYear(), ('0' + (date.getMonth() + 1)).slice(-2), ('0' + date.getDate()).slice(-2)].join('-') + 'T00:00';
this.date = (new Date).toISOString().split('T')[0] + 'T00:00';
//console.log('Date is set to "' + this.date + '"');
this.setTransactionType(type[0].toUpperCase() + type.substring(1));