Fix JSON Parse Error Invalid Date #90
@ -53,13 +53,14 @@ export class TaskEditorComponent implements OnInit {
|
||||
createTask() {
|
||||
let endDate_formatted: string|undefined = undefined;
|
||||
let startDate_formatted: string|undefined = undefined;
|
||||
if(this.endDate.value !== "") {
|
||||
if(this.endDate.value != undefined && this.endDate.value !== "") {
|
||||
endDate_formatted = moment(this.endDate.value).format('YYYY-MM-DDTHH:mm:ss.SSSZ');
|
||||
}
|
||||
|
||||
if(this.startDate.value !== "") {
|
||||
if(this.endDate.value != undefined && this.startDate.value !== "") {
|
||||
startDate_formatted = moment(this.startDate.value).format('YYYY-MM-DDTHH:mm:ss.SSSZ');
|
||||
}
|
||||
|
||||
this.taskService.tasksTaskgroupIDPut(this.editorData.taskgroupID, {
|
||||
taskName: this.nameCtrl.value,
|
||||
eta: this.etaCtrl.value,
|
||||
@ -87,13 +88,14 @@ export class TaskEditorComponent implements OnInit {
|
||||
editTask() {
|
||||
let endDate_formatted: string|undefined = undefined;
|
||||
let startDate_formatted: string|undefined = undefined;
|
||||
if(this.endDate.value !== "") {
|
||||
if(this.endDate.value != undefined && this.endDate.value !== "") {
|
||||
endDate_formatted = moment(this.endDate.value).format('YYYY-MM-DDTHH:mm:ss.SSSZ');
|
||||
}
|
||||
|
||||
if(this.startDate.value !== "") {
|
||||
if(this.startDate.value != undefined && this.startDate.value !== "") {
|
||||
startDate_formatted = moment(this.startDate.value).format('YYYY-MM-DDTHH:mm:ss.SSSZ');
|
||||
}
|
||||
|
||||
this.taskService.tasksTaskIDPost(this.editorData.task!.taskID, {
|
||||
taskName: this.nameCtrl.value,
|
||||
eta: this.etaCtrl.value,
|
||||
|
Loading…
Reference in New Issue
Block a user