Angular2 Datepicker Component
ng2-datepicker is a datepicker component for Angular2.
http://ng2-datepicker.jankuri.com
Install ng2-datepicker via npm
npm install ng2-datepicker --save
// app.module.ts
import { DatePickerModule } from 'ng2-datepicker';
@NgModule({
...
imports: [ DatePickerModule ]
...
})
export class AppModule { }
// app.component.ts
import { Component } from '@angular/core';
import { DatePickerOptions, DateModel } from 'ng2-datepicker';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
date: DateModel;
options: DatePickerOptions;
constructor() {
this.options = new DatePickerOptions();
}
}
// app.component.html
<ng2-datepicker [options]="options" [(ngModel)]="date"></ng2-datepicker>
For more info about options please see this.
git clone https://github.com/jkuri/ng2-datepicker.git --depth 1
npm install
npm start
npm run build
This project is licensed under the MIT license. See the LICENSE file for more info.