Skip to content

gigo1980/ng2-datepicker

 
 

Repository files navigation

ng2-datepicker

Angular2 Datepicker Component

ng2-datepicker is a datepicker component for Angular2.

Demo

http://ng2-datepicker.jankuri.com

Installation:

Install ng2-datepicker via npm

npm install ng2-datepicker --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>

For more info about options please see this.

Run Included Demo

git clone https://github.com/jkuri/ng2-datepicker.git --depth 1
npm install
npm start

AoT Library Build

npm run build

Licence

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

About

Angular2 Datepicker Component

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 81.4%
  • CSS 10.3%
  • HTML 7.4%
  • Shell 0.9%