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

203
Views
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 answers
Answer question

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 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!