I'm working with Angular 5 and I want to use ngx-bootstrap bsDatepicker module. I followed steps from https://ngx-universal.herokuapp.com/datepicker but datepicker doesn't show up. I just get console warning message. I don't get any error message
warn-once.js:10
BsDatepickerModule is under development,
BREAKING CHANGES are possible,
PLEASE, read changelog
Datepicker element also not rendered: https://i.stack.imgur.com/eiZQm.png
my app.module.ts:
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
...
imports: [
... ,
BsDatepickerModule.forRoot(),
... ,
],
my custom.component.html:
<div class="col-md-6">
<input type="text" class="form-control" placeholder="Datepicker" bsDatepicker
formControlName="date" />
</div>
I also added CDN link of bsDatepicker.css file to my index.html:
<link rel="stylesheet" href="https://unpkg.com/ngx-bootstrap/datepicker/bs-datepicker.css">
ngx-bootstrap: ^2.0.2
Angular: 5.1.3
Bootstrap: 3.3.7
Angular CLI: 1.6.3,
webpack: 3.10.0,
typescript: 2.4.2
There's no need to duplicate your question here if it's already been asked on StackOverflow (https://stackoverflow.com/questions/48963157/bsdatepicker-doesnt-show-up-ngx-bootstrap)
Please provide a reproduction of this issue, because we can't do much without it.
You can use one of the starter templates:
Plunkr: https://plnkr.co/edit/0NipkZrnckZZROAcnjzB?p=preview
StackBlitz: https://stackblitz.com/edit/ngx-bootstrap?file=app%2Fapp.module.ts
@IlyaSurmay man real problem is it doesn't work in children components which loaded with lazyLoading. If I add BsDatepickerModule.forRoot() to app.module.ts, It just shows app.component.html.
If I want to use this my children components, I have to add BsDatepickerModule.forRoot() to childModule which I want to use.
But ex: ModalModule.forRoots() works perfectly fine in children compontents If I just add ModalModule.forRoot() to app.module.ts :(
Most helpful comment
@IlyaSurmay man real problem is it doesn't work in children components which loaded with lazyLoading. If I add
BsDatepickerModule.forRoot()to app.module.ts, It just showsapp.component.html.If I want to use this my children components, I have to add
BsDatepickerModule.forRoot()to childModule which I want to use.But ex:
ModalModule.forRoots()works perfectly fine in children compontents If I just addModalModule.forRoot()to app.module.ts :(