Category : javascript-events

I want fill in a drop-down using javascript and the years between the seleted date range for example 1: if start date is 2012-01-01 and the end date id 2015-01-01 then the drop-down values are 2012,2013,2014,2015 example 2: if start date is 2021-01-01 and the end date id 2022-01-01 then the drop-down values are 2021,2022 ..

Read more

I am encountering a problem with a click event. I have the following html: <div class=”page-layout blank p-24″> <mat-horizontal-stepper [linear]=”true” #stepper > <mat-step [stepControl]=”firstFormGroup”> <form [formGroup]=”firstFormGroup”> <div fxLayout=”row” fxLayoutAlign=”end center”> <button type=”button” mat-raised-button (click)=”callMethodOne()” matStepperNext>NEXT</button> </div> </form> </mat-step> <mat-step > <div fxLayout=”row” fxLayoutAlign=”end center”> <button mat-raised-button matStepperPrevious>BACK</button> <button type=”button” mat-raised-button (click)=”callMethodTwo()” matStepperNext>NEXT</button> </div> </mat-step> <mat-step> ..

Read more

Need to call an API while we click on Reload button on prompt which displayed on browser refresh. window.onbeforeunload = (event) => { console.log(‘event’, event); if (this.isUtilityFormChanged) { const dialogText = this.translateService.instant( ‘MODULES.SCHEDULE_APPOINTMENT.UTILITY_PROMPT_MSG’ ); event.returnValue = dialogText; return dialogText; } else { return false } }; enter image description here Source: Angular..

Read more