Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

1.2K
Visualizações
unable to override styles in primeNG with style, styleClass, inputStyle or inputStyleClass Angular-CLI

I was finally able to get primeNG working with angular-cli. In `.angular-cli.json I have:

  "styles": [
          "../node_modules/primeng/resources/themes/omega/theme.css",
          "../node_modules/primeng/resources/primeng.css",
        "styles.css"
      ],

I am trying to use the CalendarModule like so:

import {CalendarModule} from "primeng/primeng";

@NgModule({
    imports: [
        CalendarModule
    ],

In the HTML I have the following:

<p-calendar styleClass="test" [(ngModel)]="validationDate" 
inputStyleClass="test" [showIcon]="true" dateFormat="dd.mm.yy"></pcalendar>

In the component css

@Component({
    selector: 'user-validation',
    templateUrl: 'user-validation.component.html',
    styleUrls: ['user-validation.component.css']
})

user-validation.component.css

.test{
    width: 25px;
}
over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

try

/deep/ .test{
        width: 25px !important;
}

or

>>> .test{
width: 25px !important;
}
over 4 years ago · Santiago Trujillo Relatório

0

This worked for me -

 <p-calendar name = "calendarMod" [showIcon]="true" [(ngModel)]="actionDate"  dateFormat="mm/dd/yy" [inputStyle] = "{'width':'85px'}" ></p-calendar>
over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda