Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Klinche/ng2-datepicker

 
 

Repository files navigation

ng2-datepicker

Angular2 Datepicker Component

ng2-datepicker is a datepicker component for Angular2.

Demo

http://ng2-datepicker.jankuri.com

Looking for a date range picker? Check this one: http://ng-daterangepicker.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
cd ng2-datepicker
npm install
npm start

AoT Library Build

npm run build:lib

Licence

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

Packages

No packages published

Languages

  • TypeScript 53.0%
  • HTML 24.9%
  • CSS 16.2%
  • JavaScript 5.9%