Use moment to format date correctly for api
All checks were successful
Java CI with Maven / build (push) Successful in 42s
All checks were successful
Java CI with Maven / build (push) Successful in 42s
This commit is contained in:
parent
7974bba473
commit
9ca128d80d
@ -9,6 +9,7 @@ import {
|
|||||||
} from "../../../api";
|
} from "../../../api";
|
||||||
import {MatSnackBar} from "@angular/material/snack-bar";
|
import {MatSnackBar} from "@angular/material/snack-bar";
|
||||||
import {Router} from "@angular/router";
|
import {Router} from "@angular/router";
|
||||||
|
import * as moment from "moment";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-basic-scheduler',
|
selector: 'app-basic-scheduler',
|
||||||
@ -36,7 +37,7 @@ export class BasicSchedulerComponent implements OnChanges{
|
|||||||
if(this.task != undefined) {
|
if(this.task != undefined) {
|
||||||
if(this.scheduleEntityInfo == undefined) {
|
if(this.scheduleEntityInfo == undefined) {
|
||||||
this.scheduleService.schedulesTaskIDBasicPut(this.task.taskID, {
|
this.scheduleService.schedulesTaskIDBasicPut(this.task.taskID, {
|
||||||
scheduleDate: this.dateCtrl.value
|
scheduleDate: moment(this.dateCtrl.value).format('YYYY-MM-DDTHH:mm:ss.SSSZ')
|
||||||
}).subscribe({
|
}).subscribe({
|
||||||
next: resp => {
|
next: resp => {
|
||||||
this.scheduleEmitter.emit(resp as BasicScheduleInfo);
|
this.scheduleEmitter.emit(resp as BasicScheduleInfo);
|
||||||
@ -44,7 +45,7 @@ export class BasicSchedulerComponent implements OnChanges{
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.scheduleService.schedulesScheduleIDBasicPost(this.scheduleEntityInfo!.scheduleID, {
|
this.scheduleService.schedulesScheduleIDBasicPost(this.scheduleEntityInfo!.scheduleID, {
|
||||||
scheduleDate: this.dateCtrl.value
|
scheduleDate: moment(this.dateCtrl.value).format('YYYY-MM-DDTHH:mm:ss.SSSZ')
|
||||||
}).subscribe({
|
}).subscribe({
|
||||||
next: resp => {
|
next: resp => {
|
||||||
this.router.navigateByUrl("/taskgroups/" + this.taskgroup!.taskgroupID + "/tasks/" + this.task!.taskID);
|
this.router.navigateByUrl("/taskgroups/" + this.taskgroup!.taskgroupID + "/tasks/" + this.task!.taskID);
|
||||||
|
Loading…
Reference in New Issue
Block a user