ng-bootstrap / ng-bootstrap

Angular powered Bootstrap

Home Page:https://ng-bootstrap.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DatePICKER ISSUE OR BUG

MELAS007 opened this issue · comments

Please remember, the issues forum is NOT for support requests. It is for bugs and feature requests only.
Please read https://github.com/ng-bootstrap/ng-bootstrap/blob/master/CONTRIBUTING.md and search
existing issues (both open and closed) prior to opening any new issue and ensure you follow the instructions therein.

Bug description:

Link to minimally-working StackBlitz that reproduces the issue:

You can fork a StackBlitz from one of our demos and use it as a starting point.

Please note that we can not act on bug reports without a minimal reproduction scenario in a StackBlitz. Here is why:
https://github.com/ng-bootstrap/ng-bootstrap#you-think-youve-found-a-bug

Versions of Angular, ng-bootstrap and Bootstrap:

Angular: 17.1.2

ng-bootstrap: 16.0.0

Bootstrap: 5.3.2

HELLO, I have an issue with Datepicker selection that Navigation doesn't appear at all, when I put "[navigation]="'arrow'" or "'arrows'" the monthly name disappeared! wihout nvaigation, it appears but without navigation "arrow" to navigate next month or previous month....

I posted in below the code that I work with.

Kindly let me know any solution for this issue!

<input name="datepicker" class="form-control" ngbDatepicker #datepicker="ngbDatepicker" [autoClose]="'outside'" (dateSelect)="onDateSelection($event)" [displayMonths]="2" [dayTemplate]="t" outsideDays="hidden" [startDate]="fromDate!" [navigation]="'arrow'" tabindex="-1" /> <ng-template #t let-date let-focused="focused"> <span class="custom-day" [class.focused]="focused" [class.range]="isRange(date)" [class.faded]="isHovered(date) || isInside(date)" (mouseenter)="hoveredDate = date" (mouseleave)="hoveredDate = null" > {{ date.day }} </span> </ng-template>

I got this error from console log :

core.mjs:11860 ERROR TypeError: $localize is not a function
at consts (ng-bootstrap.mjs:4743:21)
at createTView (core.mjs:12411:60)
at getOrCreateComponentTView (core.mjs:12386:28)
at addComponentLogic (core.mjs:13139:19)
at instantiateAllDirectives (core.mjs:12941:9)
at createDirectivesInstances (core.mjs:12349:5)
at ɵɵelementStart (core.mjs:22215:9)
at NgbDatepicker_Conditional_5_Template (ng-bootstrap.mjs:351:8)
at executeTemplate (core.mjs:12314:9)
at renderView (core.mjs:15336:13)

Please read the getting started guide to learn how to properly install bg-bootstrap. It has a step explaining how to add $localize.