3.0.4 • Published 5 years ago
daterangepicker-ng7-lib v3.0.4
Daterange picker NG7 Library
Angular + moment (no JQuery)
Installation
npm i daterangepicker-ng7-lib --save
Required Angular 7.0 +
Example
import { DaterangepickerNg7LibModule } from 'daterangepicker-ng7-lib';
// app.module.ts
@NgModule({
...
imports: [
...,
DaterangepickerNg7LibModule
]
...
})
export class AppModule { }
import { DaterangepickerConfig, RangeItem } from 'daterangepicker-ng7-lib';
// app.component.ts
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
})
export class AppComponent {
options: DaterangepickerConfig = {
calendarConfig: {
dayNames: ['Пн', 'Вт', 'Ср', 'Чт', 'Пт', 'Сб', 'Нд'],
containerClass: 'custom-calendar',
inputClass: 'custom-input'
},
periodLabel: 'Select range',
acceptClass: 'custom-button-accept-class',
rejectClass: 'custom-reject-accept-class',
acceptLabel: 'Select',
rejectLabel: 'Cancel',
dateRangeLabel: 'Show daterangepicker',
containerClass: 'custom-container-class'
};
ranges: RangeItem[] = [
{ label: 'Current month', period: { start: moment().startOf('month'), end: moment().endOf('month') } },
{ label: 'Current quarter', period: { start: moment().startOf('quarter'), end: moment().endOf('quarter') } }
];
constructor() {
moment.locale('uk');
}
}
License
MIT
3.0.4
5 years ago
3.0.3
5 years ago
3.0.2
5 years ago
3.0.1
6 years ago
3.0.0
6 years ago
2.0.10
6 years ago
2.0.9
6 years ago
2.0.8
6 years ago
2.0.7
6 years ago
2.0.6
6 years ago
2.0.5
6 years ago
2.0.4
6 years ago
2.0.3
6 years ago
2.0.2
6 years ago
2.0.1
6 years ago
2.0.0
6 years ago
1.0.3
6 years ago
1.0.4
6 years ago
1.0.2
6 years ago
1.0.1
6 years ago
1.0.0
6 years ago