1.1.0 • Published 5 years ago
@influans/inf-date-range-picker v1.1.0
Influans Date Range Picker for Angular
it's a fork of date-range-picker
Description
Simple Angular date range picker. This picker is responsive design, so feel free to try it in your desktops, tablets and mobile devices. This picker uses javascript library date-fns
Installation
To install this component, follow the procedure:
- Install with npm:
npm install inf-date-range-picker --save
Add DateRangePickerModule import to your @NgModule like example below
import { NgModule } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { MyTestApp } from './my-test-app'; import { DateRangePickerModule } from 'ng-pick-daterange'; @NgModule({ imports: [ BrowserModule, DateRangePickerModule ], declarations: [ MyTestApp ], bootstrap: [ MyTestApp ] }) export class MyTestAppModule {}
Usage
Use the following snippet inside your template. For example:
<inf-date-range [(dateRange)]="dateRange"></inf-date-range>
<inf-date-range [dateRange]="dateRange" (dateRangeChange)="setReturnValue($event)"></inf-date-range>
public setReturnValue(dateRange: IDateRange): any {
this.dateRange = dateRange;
// Do whatever you want to the return object 'dateRange'
}
License
- License: MIT
Author
- Author: Influans