ngx-bootstrap: 3.1.1
Angular: 6.1.10 / 7.0.1
Bootstrap: 3.3.7
Hello,
Since v3.1.1 the datepicker does not seem to work anymore (see attached screenshot) when building our app.
Our app is in French so we are using defineLocale to set the lang.
What I tested:
ng serve it works great ✔ng build --prod it produces what you can see on the screenshot ❌Please feel free to ask for more I'd be happy to help.

@bravier please provide a code of reproduction for this issue.
Thanks for your comment @Domainv.
Unfortunately I can't give you a code that reproduces the issue.
Instead what I can do is to show you how we are using the datepicker.
Here are the involved parts:
_date-chooser.component.ts_
...
import {defineLocale} from 'ngx-bootstrap/chronos';
import {frLocale} from 'ngx-bootstrap/locale';
...
@Component({
selector: 'date-chooser',
templateUrl: './date-chooser.component.html',
...
}],
})
export class DateChooserComponent {
constructor() {
defineLocale('fr', frLocale);
// We also tried using the following (saw in the docs) without success:
// this.bsLocaleService.use('fr');
}
}
_date-chooser.component.html_
<p bsDatepicker [bsConfig]='{dateInputFormat: "DD/MM/YYYY", locale: "fr"}' [bsValue]='date'>{{ date | date:'dd/MM/y' }}</p>
Hope this helps!
I am also facing this same problem, I am on 'en' locale though

I don't know If this might help you guys, but I downgraded to 3.0.0 and it's working fine. I suggest downgrading for a while till they fix this problem 👍
Absolutely @rabingaire20 we also fixed it by downgrading to 3.0.1.
@bravier This issue related to https://github.com/angular/angular-cli/issues/12112
just set "buildOptimizer": false
@Domainv You save my day 👍
It looks to me, that the problem is actually in the code of ngx-bootstrap, rather than in Angular CLI.
Setting the buildOptimizer to false for a single package is not the way to go. This seems like a library issue with ngx-bootstrap.
closes as duplicate of #4752
@here The issue fixed from 3.1.2 version
Most helpful comment
It looks to me, that the problem is actually in the code of ngx-bootstrap, rather than in Angular CLI.