md-inputfield class not working for pInputNumber

Post Reply
info@smart-jack.com
Posts: 6
Joined: 23 Sep 2019, 10:25

24 Nov 2020, 10:28

PrimeNG version: 9.0.2
Template: Sapphire

When using the md-inputfield class, the pInputNumber and pInputText elements look different so I can't use it in a form if I want to maintain the same style.

Code: Select all

<span class="md-inputfield">
   <input
         id="text-input"
         type="text"
         pInputNumber
          [(ngModel)]="someField"
    />
   <label for="text-input">I'm a pInputText</label>
</span>

Code: Select all

<span class="md-inputfield">
   <input
          style="min-width: 300px;"
         id="number-input"
         type="number"
         pInputNumber
          [(ngModel)]="someOtherField"
    />
   <label for="number-input">I'm an pInputNumber</label>
</span>
Image

mert.sincan
Posts: 4569
Joined: 29 Jun 2013, 12:38

24 Nov 2020, 12:14

Hi,

Please try p-float-label instead of md-inputfield; https://primefaces.org/primeng/showcase/#/floatlabel

Best Regards,

info@smart-jack.com
Posts: 6
Joined: 23 Sep 2019, 10:25

24 Nov 2020, 13:35

This class doesn't seem to exist in the version I'm using (9.0.2) and I can't upgrade now.

mert.sincan
Posts: 4569
Joined: 29 Jun 2013, 12:38

02 Dec 2020, 09:23

Thanks a lot for the update! @merve could you please check this issue with 9.0.2?

Best Regards,

Post Reply

Return to “Sapphire - PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 1 guest