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

536
Views
Input Password PrimeNG only works after clicking on the input

I have the following problem when using ngprime, when the page loads the input is buggy. If I click on the input it is correct, according to the second photo. Can you help me with this? I installed prime flex, prime ng. I imported the styles in angular.json

  formulario: FormGroup = this.fb.group({
    email: [null, [Validators.email, Validators.required]],
    password: [null, Validators.required]
  });
    <form [formGroup]="formulario" class="p-fluid mt-5">

      <fieldset class="field">
        <label for="password" class="block">Email</label>
        <span class="p-input-icon-left my-2">
          <i class="pi pi-user"></i>
          <input id="email" formControlName="email" type="email" pInputText placeholder="Email">
        </span>
      </fieldset>

      <fieldset class="field mt-2">
        <label for="password" class="block">Password</label>

        <p-password id="password" formControlName="password" [toggleMask]="true" promptLabel="Ingresa tu contraseña"
          weakLabel="Débil" goodLabel="Buena" strongLabel="Fuerte">
        </p-password>
      </fieldset>

    </form>

enter image description here

enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

It appears to be a known bug in the component. You can see the thread on GitHub here.

There's a workaround until they fix it. Add the following attribute to the p-password element:

styleClass="p-password p-component p-inputwrapper p-input-icon-right"

Like this:

<p-password id="password" 
            [toggleMask]="true"
            promptLabel="Ingresa tu contraseña"
            weakLabel="Débil" goodLabel="Buena" strongLabel="Fuerte"
            styleClass="p-password p-component p-inputwrapper p-input-icon-right">
</p-password>
about 4 years ago · Juan Pablo Isaza Report
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!