Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(date-value): do not submit in case of period button (DEV-373) #635

Merged
merged 2 commits into from Jan 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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