Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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 d7ac1b6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Expand Up @@ -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>
Expand Down
Expand Up @@ -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);
}

Expand Down

0 comments on commit d7ac1b6

Please sign in to comment.