使用このラッパーjquery、bootstrap ..のようにnpmパッケージ in .html
<input daterangepicker
(selected)="dateSelected($event)"
[options]="pickerOptions" type="submit"
[disabled]="disabled"
value="{{datelabel}}"
class="form-control btn btn-primary inputField"/>
.TSで
@Output() selectedDate:EventEmitter<any> = new EventEmitter(false);
public disabled:boolean;
private pickerOptions: Object = {
'showDropdowns': true,
'showWeekNumbers': true,
'timePickerIncrement': 5,
'autoApply': true,
'startDate': '04/27/2016',
'endDate': '07/27/2016'
};
private formats:Array<string> = ['DD-MM-YYYY', 'YYYY/MM/DD', 'DD.MM.YYYY', 'shortDate'];
private format:string = this.formats[0];
private startdate: Date = new Date();
private enddate: Date = new Date();
private datelabel: string = 'Please choose a date';
private selected: any;
constructor() {
this.disabled = false;
this.selected = {};
}
private dateSelected(message: any) {
this.selectedDate.emit(message);
}
これを参照してください - http://stackoverflow.com/questions/38378686/how-i-use-daterangepicker-js-in-my-angular-2-project – Sanket