app.component.ts
import { Component } from '@angular/core';
import {
NgbCalendar, NgbDatepicker, NgbDateStruct
} from '@ng-bootstrap/ng-bootstrap';
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent {
//model:NgbDateStruct;
model:any;
constructor(private calendar: NgbCalendar) {}
}
app.component.html
<h4 style="padding-top:25px; padding-bottom:25px;">
Angular Bootstrap - Show multiple months in a Datepicker
</h4>
<h5><b>Selected Date:</b></h5>
<h5>{{ model | json}}</h5>
<br/>
<ngb-datepicker
#datePicker
[displayMonths]="2"
[showWeekNumbers]="true"
outsideDays="collapsed"
[(ngModel)]="model">
</ngb-datepicker>
- angular bootstrap - Show custom label in Progressbar
- angular bootstrap - How to change Progressbar height
- angular bootstrap - How to use Popover
- angular bootstrap - Popover with HTML content
- angular bootstrap - How to delay Popover open close
- angular bootstrap - How to use Timepicker
- angular bootstrap - Timepicker with second
- angular bootstrap - How to use Datepicker
- angular bootstrap - Select today from Datepicker
- angular bootstrap - Datepicker navigate & select today
- angular bootstrap - Datepicker navigate event
- angular bootstrap - Select date range in a Datepicker
- angular bootstrap - Select date range from Datepicker popup
- angular bootstrap - How to enable disable Datepicker
- angular bootstrap - Datepicker custom day style