Skip to content
Permalink
Browse files
fix(date-value): do not submit in case of period button (DEV-373) (#635)
  • Loading branch information
kilchenmann committed Jan 17, 2022
1 parent 2c5fd80 commit d7ac1b6c261b2a0cebb4a86174f7692559e6e5f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
@@ -7,7 +7,7 @@

<button mat-button class="toggle-period-control" [disabled]="!startDate.value"
[matTooltip]="(isPeriodControl.value ? 'Delete end date' : 'Add end date')" matTooltipPosition="above"
(click)="togglePeriodControl()">
(click)="togglePeriodControl($event)">
<mat-icon *ngIf="!isPeriodControl.value">keyboard_tab</mat-icon>
<mat-icon *ngIf="isPeriodControl.value">remove</mat-icon>
</button>
@@ -300,7 +300,8 @@ export class DateValueHandlerComponent extends _MatInputMixinBase implements Con
this.onChange(this.value);
}

togglePeriodControl() {
togglePeriodControl(ev: Event) {
ev.preventDefault();
this.isPeriodControl.setValue(!this.isPeriodControl.value);
}

0 comments on commit d7ac1b6

Please sign in to comment.