ngx-date-picker-fns
v2.5.0
Published
Angular Datepicker Component
Downloads
24
Maintainers
Readme
ngx-date-picker
Angular Datepicker Component
ngx-date-picker is a date-picker component for Angular
Demo
https://gnurub.github.io/ngx-datepicker/
Looking for a date range picker? Check this one: https://gnurub.github.io/ngx-daterangepicker/
Installation:
Install ngx-date-picker via npm
npm install ngx-date-picker-fns --save
Integration
// app.module.ts
import { NgxDatePickerModule } from 'ngx-date-picker-fns';
@NgModule({
...
imports: [ NgxDatePickerModule ]
...
})
export class AppModule { }
// app.component.ts
import { Component } from '@angular/core';
import { NgxDatePickerOptions, DateModel } from 'ngx-date-picker-fns';
@Component({
selector: 'app-root',
templateUrl: 'app.component.html'
})
export class AppComponent {
date: DateModel;
options: NgxDatePickerOptions;
constructor() {
this.options = new NgxDatePickerOptions();
}
}
// app.component.html
<ngx-date-picker [options]="options" [(ngModel)]="date"></ngx-date-picker>
For more info about options please see this.
Run Included Demo
git clone https://github.com/GNURub/ngx-datepicker.git --depth 1
cd ngx-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.