Skip to content

pedrochaves86/ng2-datepicker

 
 

Repository files navigation

ng2-datepicker

Angular 2+ Simple and minimal datepicker component

AbstruseCI

Installation

  1. Install package from npm.
npm install ng2-datepicker --save
  1. Include NgDatepickerModule into your application.
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { NgDatepickerModule } from 'ng2-datepicker';

@NgModule({
  imports: [
    BrowserModule,
    NgDatepickerModule
  ],
  declarations: [ AppComponent ],
  exports: [ AppComponent ]
})
export class AppModule {}

Options

import { DatepickerOptions } from 'ng2-datepicker';

options: DatepickerOptions = {
  minYear: 1970,
  maxYear: 2030,
  displayFormat: 'MMM D[,] YYYY',
  barTitleFormat: 'MMMM YYYY',
  firstCalendarDay: 0; // 0 - Sunday, 1 - Monday
};

For available format options check out here.

Run Included Demo

  1. Clone this repository
git clone https://github.com/jkuri/ng2-datepicker.git
cd ng2-datepicker
  1. Install packages
npm install
  1. Run Demo
npm start

Licence

MIT

About

Angular2 Datepicker Component

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 41.7%
  • JavaScript 37.4%
  • HTML 11.6%
  • CSS 9.3%