Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

248
Views
Keyup not working for PWA angular even after changing from keypress

I have a function to validate in input field / date field. When using (keypress) it is working fine on web but not in mobile. And when I am using (keyup) , the validation is not working in web as well.

What is the permanent solution for PWA Angular for this issue ?

// to validate date in numberic and / only
  keyPressAlphanumeric(event: any) {
    var inp = String.fromCharCode(event.keyCode);
    if (/[0-9_/]/.test(inp)) {
      return true;
    } else {
      event.preventDefault();
      return false;
    }
  }


<input matInput [matDatepicker]="picker"  maxlength="10" [max]="maxDate" placeholder="MM/DD/YYYY" required
                formControlName="DOI" autocomplete="off" (keypress)="keyPressAlphanumeric($event)">
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!