mdc-date

Angular2 Datepicker Component


Keywords
angular, angular2, angular4, ng2, ng4, ngx, datepicker, date, component
License
MIT
Install
npm install mdc-date@1.0.1

Documentation

mdc-date

Angular2 Datepicker Component

mdc-date is a datepicker component for Angular2.

Installation:

Install mdc-date via npm

npm install mdc-date --save

Integration

// 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>

AoT Library Build

npm run build:lib

Licence

This project is licensed under the MIT license. See the LICENSE file for more info.