dclib-ngx-daterangepicker
v0.2.3
Published
Date Time Range-picker base on mat-datepicker
Downloads
4
Maintainers
Readme
npm install dclib-ngx-daterangepicker --save
dependencies
npm install --save moment moment-range npm install --save @angular/material @angular/cdk @angular/animations
#usage import { DclibNgxDaterangepicker } from 'dclib-ngx-daterangepicker';
imports: [ ... DclibNgxDaterangepicker ],
#html <dclib-ngx-daterangepicker [dateTimeRangeForm]="yourFormControl" [yourFunction]="yourFunction.bind(this)" [panelClass]="'your-panel-class'">
#ts yourFormControl = new FormControl(); // default new Date() --> +5 dayes
//optional
//ngOnInit() {
//this.yourFormControl.setvalue('YYYY-MM-DD HH:mm:ss - YYYY-MM-DD HH:mm:ss ')
//}
yourFunction(data) { console.log(data) // output {from: 'YYYY-MM-DD HH:mm:ss', to: 'YYYY-MM-DD HH:mm:ss'} }