我正在使用NgbDatepicker(版本4.2.2)设置displayMonths
= 2,但是日子错了。
即:11月在星期六30结束,但是显示的下一个日期是星期一1,而不是星期日1。
<section class="popover-body">
<!-- date picker-->
<ngb-datepicker #dp (select)="onDateSelection($event)" [displayMonths]="2" [dayTemplate]="t" outsideDays="hidden">
</ngb-datepicker>
</section>
<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>
答案 0 :(得分:0)
只需添加CSS样式,如果您使用flex, justify-content:flex-end;