This is advanced angular library built in angular 5 with range selection and time selection.
- momentjs
- angular v5
$ npm i date-range-pickr
<rj-date-range-pickr dateformat="DD-MMM-YYYY" (dateEmit)="onOpen($event)" credit=0></rj-date-range-pickr>
You can use 'dateformat' to format date and display - follows momentjs date dateformat You can use 'dateEmit' to retrieve the date and format it for your purpose or communicating to parent components Optional credit attribute to give me some credits :)
import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import {DateRangePickrModule} from 'date-range-pickr';
import { AppComponent } from './app.component';
@NgModule({
declarations: [
AppComponent
],
imports: [
BrowserModule,DateRangePickrModule
],
providers: [],
bootstrap: [AppComponent]
})
export class AppModule { }
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.