diff --git a/backend/.idea/workspace.xml b/backend/.idea/workspace.xml
index e58e44b..28d992a 100644
--- a/backend/.idea/workspace.xml
+++ b/backend/.idea/workspace.xml
@@ -4,13 +4,7 @@
-
-
-
-
-
-
-
+
@@ -85,7 +79,7 @@
-
+
diff --git a/frontend/package-lock.json b/frontend/package-lock.json
index 3005d75..3e6f8ee 100644
--- a/frontend/package-lock.json
+++ b/frontend/package-lock.json
@@ -17,6 +17,7 @@
"@angular/core": "^16.2.7",
"@angular/forms": "^16.2.7",
"@angular/material": "^16.2.6",
+ "@angular/material-moment-adapter": "^16.2.7",
"@angular/platform-browser": "^16.2.7",
"@angular/platform-browser-dynamic": "^16.2.7",
"@angular/router": "^16.2.7",
@@ -524,9 +525,9 @@
}
},
"node_modules/@angular/cdk": {
- "version": "16.2.6",
- "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-16.2.6.tgz",
- "integrity": "sha512-vSaPs69xutbxc6IbZz4I5fMzZhlypsMg5JKKNAufmyYNNHQYgSQytpUd1/RxHhPF/JoEvj/J8QjauRriZFN+SA==",
+ "version": "16.2.7",
+ "resolved": "https://registry.npmjs.org/@angular/cdk/-/cdk-16.2.7.tgz",
+ "integrity": "sha512-LLbCu0pHHsZWGjSpQW0qRoKYRCm09TuFH2vzsViyaQF7umDKlk52QcDFB/nMioyiWPgqXkyHyGMFG1vFBNSIeg==",
"dependencies": {
"tslib": "^2.3.0"
},
@@ -701,9 +702,9 @@
}
},
"node_modules/@angular/material": {
- "version": "16.2.6",
- "resolved": "https://registry.npmjs.org/@angular/material/-/material-16.2.6.tgz",
- "integrity": "sha512-JFP12dLrsKwrQ4zZtSRJarYosnxikxLD2M9hfUtHVxgTJr7rdSQ8eE7G2l2zPALSUt+d44MWgQ79xu6inuvEOw==",
+ "version": "16.2.7",
+ "resolved": "https://registry.npmjs.org/@angular/material/-/material-16.2.7.tgz",
+ "integrity": "sha512-f5J/YdbrgaoeRhqDVNhauY/nHMSbF4zTph5gYtkGu49MQHpf6vAxfW9m8E2Rs/RPmhb44e3671Z8nONbvP6yGg==",
"dependencies": {
"@material/animation": "15.0.0-canary.bc9ae6c9c.0",
"@material/auto-init": "15.0.0-canary.bc9ae6c9c.0",
@@ -756,7 +757,7 @@
},
"peerDependencies": {
"@angular/animations": "^16.0.0 || ^17.0.0",
- "@angular/cdk": "16.2.6",
+ "@angular/cdk": "16.2.7",
"@angular/common": "^16.0.0 || ^17.0.0",
"@angular/core": "^16.0.0 || ^17.0.0",
"@angular/forms": "^16.0.0 || ^17.0.0",
@@ -764,6 +765,19 @@
"rxjs": "^6.5.3 || ^7.4.0"
}
},
+ "node_modules/@angular/material-moment-adapter": {
+ "version": "16.2.7",
+ "resolved": "https://registry.npmjs.org/@angular/material-moment-adapter/-/material-moment-adapter-16.2.7.tgz",
+ "integrity": "sha512-VvPkRvloja8lJ63b3ZmkLlXc5DZpDAiI5gvtlGDGpTBPRewhg+fraI1glKrmCHZKCQCTjwzF6UOzOwJMvvRaSA==",
+ "dependencies": {
+ "tslib": "^2.3.0"
+ },
+ "peerDependencies": {
+ "@angular/core": "^16.0.0 || ^17.0.0",
+ "@angular/material": "16.2.7",
+ "moment": "^2.18.1"
+ }
+ },
"node_modules/@angular/platform-browser": {
"version": "16.2.7",
"resolved": "https://registry.npmjs.org/@angular/platform-browser/-/platform-browser-16.2.7.tgz",
diff --git a/frontend/package.json b/frontend/package.json
index 54bddaa..0c876cd 100644
--- a/frontend/package.json
+++ b/frontend/package.json
@@ -19,6 +19,7 @@
"@angular/core": "^16.2.7",
"@angular/forms": "^16.2.7",
"@angular/material": "^16.2.6",
+ "@angular/material-moment-adapter": "^16.2.7",
"@angular/platform-browser": "^16.2.7",
"@angular/platform-browser-dynamic": "^16.2.7",
"@angular/router": "^16.2.7",
diff --git a/frontend/src/app/app.module.ts b/frontend/src/app/app.module.ts
index 045f1ff..c8ce1e6 100644
--- a/frontend/src/app/app.module.ts
+++ b/frontend/src/app/app.module.ts
@@ -50,6 +50,8 @@ import {MatTableModule} from "@angular/material/table";
import {MatCheckboxModule} from "@angular/material/checkbox";
import {MatCardModule} from "@angular/material/card";
import {MatListModule} from "@angular/material/list";
+import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatNativeDateModule} from "@angular/material/core";
+import {MomentDateAdapter} from "@angular/material-moment-adapter";
@NgModule({
declarations: [
@@ -97,11 +99,10 @@ import {MatListModule} from "@angular/material/list";
MatDatepickerModule,
MatInputModule,
MatDatepickerModule,
- MatMomentDateModule,
+ MatNativeDateModule
],
providers: [
HttpClientModule,
- {provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: {useUtc: true}},
/*
This is the configuration for the code generated by OpenApiGenerator.
It specifies that the API code should use our `AuthService` to get the currently stored
@@ -125,8 +126,7 @@ import {MatListModule} from "@angular/material/list";
),
deps: [AuthService],
multi: false
- }
-
+ },
],
bootstrap: [AppComponent]
})
diff --git a/frontend/src/app/tasks/task-editor/task-editor.component.ts b/frontend/src/app/tasks/task-editor/task-editor.component.ts
index 3985063..bf196ee 100644
--- a/frontend/src/app/tasks/task-editor/task-editor.component.ts
+++ b/frontend/src/app/tasks/task-editor/task-editor.component.ts
@@ -1,16 +1,20 @@
import { Component, OnInit } from '@angular/core';
import {UntypedFormControl, Validators} from "@angular/forms";
+import * as _moment from 'moment';
+import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE} from "@angular/material/core";
+import {MomentDateAdapter} from "@angular/material-moment-adapter";
+const moment = _moment;
@Component({
selector: 'app-task-editor',
templateUrl: './task-editor.component.html',
- styleUrls: ['./task-editor.component.css']
+ styleUrls: ['./task-editor.component.css'],
})
export class TaskEditorComponent implements OnInit {
nameCtrl = new UntypedFormControl('', [Validators.required, Validators.maxLength(255)])
etaCtrl = new UntypedFormControl(0, [Validators.required, Validators.min(0)])
- startDate = new UntypedFormControl(Date.now(), [Validators.required])
+ startDate = new UntypedFormControl(moment.now, [Validators.required])
constructor() { }
ngOnInit(): void {