-
+
+
+
diff --git a/src/app/child-dev-project/notes/note-details/note-details.component.spec.ts b/src/app/child-dev-project/notes/note-details/note-details.component.spec.ts
index fe27dd565d..bd71fe8314 100644
--- a/src/app/child-dev-project/notes/note-details/note-details.component.spec.ts
+++ b/src/app/child-dev-project/notes/note-details/note-details.component.spec.ts
@@ -19,6 +19,8 @@ import { ChildrenService } from '../../children/children.service';
import { WarningLevel } from '../../warning-level';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { SchoolBlockComponent } from '../../schools/school-block/school-block.component';
+import { MatDatepickerModule } from '@angular/material/datepicker';
+import { MatNativeDateModule } from '@angular/material/core';
describe('NoteDetailsComponent', () => {
let component: NoteDetailsComponent;
@@ -38,7 +40,7 @@ describe('NoteDetailsComponent', () => {
TestBed.configureTestingModule({
declarations: [ NoteDetailsComponent, ChildSelectComponent, ChildBlockComponent, SchoolBlockComponent ],
imports: [MatDialogModule, MatAutocompleteModule, MatFormFieldModule, MatInputModule, MatSelectModule,
- FormsModule, NoopAnimationsModule, MatIconModule,
+ FormsModule, NoopAnimationsModule, MatIconModule, MatDatepickerModule, MatNativeDateModule,
UiHelperModule, EntityModule],
providers: [
{provide: Database, useClass: MockDatabase},
diff --git a/src/app/core/ui-helper/entity-subrecord/entity-subrecord.component.html b/src/app/core/ui-helper/entity-subrecord/entity-subrecord.component.html
index fc64ed4242..ed53b8d836 100644
--- a/src/app/core/ui-helper/entity-subrecord/entity-subrecord.component.html
+++ b/src/app/core/ui-helper/entity-subrecord/entity-subrecord.component.html
@@ -32,7 +32,9 @@
matInput type="number" min="0" [title]="col.label" [value]="rec[col.name]" (change)="rec[col.name]=$event.target.valueAsNumber">
+ matInput [title]="col.label" [value]="rec[col.name]" (dateChange)="rec[col.name]=$event.target.value" [matDatepicker]="subrecordDatepicker">
+
+
diff --git a/src/app/core/ui-helper/entity-subrecord/entity-subrecord.component.spec.ts b/src/app/core/ui-helper/entity-subrecord/entity-subrecord.component.spec.ts
index e4ecbe63db..7015b7b534 100644
--- a/src/app/core/ui-helper/entity-subrecord/entity-subrecord.component.spec.ts
+++ b/src/app/core/ui-helper/entity-subrecord/entity-subrecord.component.spec.ts
@@ -14,6 +14,7 @@ import { ConfirmationDialogService } from '../confirmation-dialog/confirmation-d
import { CommonModule } from '@angular/common';
import { Database } from '../../database/database';
import { EntitySchemaService } from '../../entity/schema/entity-schema.service';
+import { MatDatepickerModule } from '@angular/material/datepicker';
describe('EntitySubrecordComponent', () => {
let component: EntitySubrecordComponent;
@@ -23,7 +24,7 @@ describe('EntitySubrecordComponent', () => {
TestBed.configureTestingModule({
declarations: [ EntitySubrecordComponent ],
imports: [MatTableModule, MatFormFieldModule, MatIconModule,
- MatSnackBarModule, MatSelectModule, MatDialogModule, MatAutocompleteModule, CommonModule],
+ MatSnackBarModule, MatSelectModule, MatDialogModule, MatAutocompleteModule, MatDatepickerModule, CommonModule],
providers: [
EntityMapperService,
EntitySchemaService,
diff --git a/src/app/core/ui-helper/ui-helper.module.ts b/src/app/core/ui-helper/ui-helper.module.ts
index 141b5f709b..12ce73b130 100644
--- a/src/app/core/ui-helper/ui-helper.module.ts
+++ b/src/app/core/ui-helper/ui-helper.module.ts
@@ -13,6 +13,7 @@ import { MatTableModule } from '@angular/material/table';
import { ConfirmationDialogService } from './confirmation-dialog/confirmation-dialog.service';
import { EntitySubrecordComponent } from './entity-subrecord/entity-subrecord.component';
import { KeysPipe } from './keys-pipe/keys.pipe';
+import { MatDatepickerModule } from '@angular/material/datepicker';
@NgModule({
imports: [
@@ -26,6 +27,7 @@ import { KeysPipe } from './keys-pipe/keys.pipe';
MatSnackBarModule,
MatSortModule,
MatAutocompleteModule,
+ MatDatepickerModule,
],
declarations: [ConfirmationDialogComponent, EntitySubrecordComponent, KeysPipe],
exports: [EntitySubrecordComponent, KeysPipe],