Skip to content

🐞 Bug: Datepicker initial position incorrect with Angular esbuild/Vite builder #6800

@Tejas712

Description

@Tejas712

Description

After migrating from the Webpack builder to the new Angular esbuild/Vite-based builder, the ngx-bootstrap datepicker briefly renders at the top-left corner of the screen before repositioning correctly.


Environment

  • Angular: 20.x
  • ngx-bootstrap: 20.0.2
  • Builder: @angular-devkit/build-angular:browser-esbuild
  • Bootstrap the application using bootstrapApplication
  • Browser: Chrome (latest)
  • OS: (e.g. macOS / Windows)

<div class="input-group">
  <input
    #dateInput
    type="text"
    [placeholder]="placeholder"
    [container]="'bs-datepicker-container'"
    class="form-control pointer"
    [bsConfig]="datePickerConfig"
    (bsValueChange)="changeDate($event)"
    [bsValue]="bsValue"
    #dp="bsDatepicker"
    bsDatepicker
    (keydown)="preventInput($event)"
  />
  @if (showCalendarIcon) {
    <div class="input-group-addon" (click)="dp.show()">
      <span class="fa fa-calendar"></span>
    </div>
  }
</div>

Component Configuration (TypeScript)

datePickerConfig: Partial<BsDatepickerConfig> = {
  isAnimated: true,
  containerClass: "theme-dark-blue",
  dateInputFormat: "DD/MM/YYYY",
  showWeekNumbers: false,
  adaptivePosition: true,
};

Additional Info

If any additional details, logs, or a reproduction repo are needed, please let me know and I’ll be happy to provide them.

Screen.Recording.2026-03-24.at.4.27.54.PM.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions