Ngx-bootstrap: Error with datepicker of ngx-bootstrap@latest After upgrading to version 9.0.0-rc.8

Created on 8 Feb 2020  路  10Comments  路  Source: valor-software/ngx-bootstrap

ERROR in Symbol BsDaterangepickerInlineContainerComponent declared in X/node_modules/ngx-bootstrap/datepicker/themes/bs/bs-daterangepicker-inline-container.component.d.ts is not exported from ngx-bootstrap (import into X)

issue

Most helpful comment

It works for me with Ivy after changing this
import { BsDatepickerModule } from 'ngx-bootstrap' to
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker'

https://github.com/valor-software/ngx-bootstrap/pull/5268#issuecomment-502142482

All 10 comments

experiencing the same issue

similar problem with final release of 9.0.0

Hi @shivaji33 ! Could you please provide a minimal reproduction example in Stackblitz? You can use my template
https://stackblitz.com/edit/github-5cak2w

it's working fine in new angular application but not working in the existing application. plz find the below image.
Screenshot from 2020-02-10 17-54-41

same problem with a working Angular 8 app. Upgrade to Angular 9 initiate this issue.

It works for me with Ivy after changing this
import { BsDatepickerModule } from 'ngx-bootstrap' to
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker'

https://github.com/valor-software/ngx-bootstrap/pull/5268#issuecomment-502142482

Hey it's working thanks 馃榾

This resolved the issue for me as well, it looks like the top level 'ngx-bootstrap' import is no longer working as expected. Although, importing at that level doesn't allow proper tree-shaking from what I understand so it's probably not a good idea to use it anyway.

Angular 9 doesn't support such imports:
import { ... } from 'ngx-bootstrap'
We are going to update the documentation to mention this case. Thanks, everyone!

Thank you! importing BsDatepickerModule this way worked here!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

haisaco picture haisaco  路  3Comments

juanitavollmering picture juanitavollmering  路  3Comments

PascalHonegger picture PascalHonegger  路  3Comments

Scooviese picture Scooviese  路  3Comments

phmello picture phmello  路  3Comments