Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

205
Vistas
ng bootstrap datepicker style leak

I am having a problem where my ng-bootstrap datepicker is being styled incorrectly. Please see the following image:

style issue

It looks like there is a large margin being applied to the right side of each of the class="ngb-dp-day"s where the resulting size is not correct, and therefore each column of days stacks vertically on top of each other.

I have looked through the element tree and cannot seem to find any classes that may receive leaking styles from other elements.

Any of the three ViewEncapsulation methods (None, Native, or Emulated) make a difference either. Same vertical stacking.

I am rendering the datepicker inside of a ng-bootstrap modal body. html below:

<ng-template #content let-c="close" let-d="dismiss">
  <div class="modal-header">
    ...
  </div>
  <div class="modal-body">
    <ngb-datepicker #dp [(ngModel)]="model.dateStruct" (navigate)="date = $event.next"></ngb-datepicker>
  </div>
  <div class="modal-footer">
    ...
  </div>
</ng-template>

Any more information I can provide?

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

Kinda hard to isolate the issue with just that, I'd say that wrapping each day in a div element which is set to display: block, it's what's causing the vertical stacking.

You could try either approaches:

  • Set .ngb-dp-day's parent container to display: flex; & flex-flow: row wrap;

Or

  • Set div.ngb-dp-day to display: inline-block; or float: left;
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda