0.0.7 • Published 5 years ago
ng-alice-date-range v0.0.7
Ng Alice Date Range
This component is part of Alice angular component library
Dependencies
MOMENT Make sure you have installed the latest version on momentjs
npm install moment
Install
npm install ng-alice-date-range
Properties
Name | Description | Default |
---|---|---|
title | Title of the pop calendar | Date Range |
minDate | the min date the calendar can use | -2 year from current date |
maxDate | the max date the calendar can use | 2 year from current date |
startDate | the start date date selected | null |
endDate | the end date date selected | null |
alignment | the location of the popup calendar \n options: 'top left','top right', 'bottom left', 'bottom right' | 'top left' |
allowForever | to allow the user to select only the start date and the end date will be until the max date | false |
Events
Name | Description | Output |
---|---|---|
selectedDates | this event will fire when the apply button is clicked | {startDate: <ISO DATE>, endDate: <ISO DATE>} |
Example
After installing ng-alice-date-range
app.module.ts
import { NgAliceDateRangeModule } from 'ng-alice-date-range';
...
@NgModule({
...
imports: [
...
NgAliceDateRangeModule
]
...
})
HTML
<ng-alice-date-range alignment="bottom left" startDate="4/4/2019" endDate=:"4/4/2020" (selectedDates)="output($event)">