Skip to content

Commit

Permalink
feat(investigation): TRACEFOSS-2857-fix date input logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mwesener committed Dec 13, 2023
1 parent 5ff46fe commit 8130588
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres
to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [UNRELEASED - DD.MM.YYYY]
### Added
### Changed
- Restricted datefield on investigation creation to be only clickable and not editable

## [10.0.0 - 12.12.2024]
### Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
-->

<div class="flex flex-col">
<mat-form-field>
<mat-form-field tabindex=0>
<mat-label>{{ label }}</mat-label>
<input
#inputElement
Expand All @@ -29,6 +29,8 @@
[attr.max]="maxDate || null"
[formControl]="control"
[errorStateMatcher]="matcher"
onkeydown="return false"
(click)="openDatePicker(inputElement)"
matInput
type="datetime-local"
placeholder="start date"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,8 @@ export class DateTimeComponent extends BaseInputComponent<Date> {
constructor(@Inject(Injector) injector: Injector, staticIdService: StaticIdService) {
super(injector, staticIdService);
}

openDatePicker(element: any): void{
element.showPicker();
}
}

0 comments on commit 8130588

Please sign in to comment.