Hey everyone!
I'm trying to convince your datepicker to use [minDate], [bsConfig] and [bsValue]. This works perfectly fine when testing locally, but on production we use AOT & Uglify and it's not working.
Using:
Angular 4.2.6
Angular/CLI 1.4.3
Webpack 3.5.6
ngx-bootstrap 1.9.3
Error:
ERROR in Template parse errors:
Can't bind to 'minDate' since it isn't a known property of 'input'. ("
<input type="text"
class="form-control"
[ERROR ->][minDate]="minDate"
#dp="bsDatepicker"
placeholder="Click to toggle")
Have you had that issue? Any hints on that?
bsDatepicker attribute on this inputsince it isn't a known property of there are so many thingsThanks for providing versions :+1:
Hey,
thanks for the help (I did search the interwebs a lot before posting here). I don't know why the error message in our build swallowed the "bsDatepicker", but this is the actual code:
<input type="text"
class="form-control"
[minDate]="minDate"
#dp="bsDatepicker"
placeholder="Click to toggle date picker"
(bsValueChange)="arrivalUpdated($event)"
bsDatepicker
value="{{ arrivalDate | date: 'shortDate' }}"
[(ngModel)]="arrivalDate">
The component itselft imports
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker' ;
Here https://github.com/valor-software/ngx-bootstrap/issues/2716
nuked said:
in my case i put BsDatepickerModule.forRoot() in global app.module.ts, but then I forgot to import same module inside of child module as well.
And that was my problem too. Maybe it's also yours.