-
-
Notifications
You must be signed in to change notification settings - Fork 255
Getting started
Fetrarijaona R edited this page Mar 30, 2018
·
1 revision
- Run
npm install ngx-daterangepicker-material --save
- import NgxDaterangepickerMd to your @NgModule like example below
import { NgModule } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { BrowserModule } from '@angular/platform-browser';
import { App } from './app';
import { NgxDaterangepickerMd } from 'ngx-daterangepicker-material';
@NgModule({
imports: [BrowserModule, FormsModule, NgxDaterangepickerMd],
declarations: [App],
bootstrap: [App]
})
export class AppModule {}
- Use it in our component:
@Component({
selector: 'ngx-root',
template: `<input type="text" ngxDaterangepickerMd [(ngModel)]="selected" class="form-control"/>`
})
export class AppComponent {
selected = {startDate: moment(), endDate: moment().add('3', 'days')};
}