ngx-bootstrap: Daterangepicker problems when compiling (--prod)

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 5.6.0

Angular: 8.2.14

Bootstrap: 3.4.1


I’m trying to compile the project and I get an error on the console, the error is in the Daterangepicker component.

I noticed that the error is in the json file (ngx-bootstrap-datepicker.metadata.json) that is imported into the project.

There are no references to:

  • chosenRange
  • setRangeOnCalendar

Here (ngx-bootstrap-datepicker.metadata.json):

<div class=\"bs-datepicker-custom-range\" *ngIf=\"customRanges?.length > 0\">\n    
           <bs-custom-date-view \n      [selectedRange]=\"chosenRange\" \n      [ranges]=\"customRanges\"\n      (onSelect)=\"setRangeOnCalendar($event)\">\n    
           </bs-custom-date-view>
</div>

The error happens only in --prod.

image

Thanks in advance. Hugs

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 2
  • Comments: 19 (2 by maintainers)

Commits related to this issue

Most upvoted comments

@daniellnog for some reasons they didn’t switch to 5.6.2 as latest version. always it points as it’s the next one. any way try to upgrade to 5.6.2 and it will work with you

image

@khaledelkholy83 thanks bro . i was also stuck in same problem. i change npm boostrap 5.6.1 to npm boostrap 5.6.2 then my ‘ng build --prod’ command run. worked fine. 😃

@ahmedsherifm I have already the newest version (5.6.1) and the same issue is happening yet…

The solution that I found was to downgrade the version to 5.1.0 and it solve my problem…