Skip to content

Repository files navigation

ng2-datepicker

Angular 2+ Simple and minimal datepicker component

Minion

Installation

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

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

Options

import { DatepickerOptions } from 'ng2-32datepicker';
import * as es from 'date-fns/locale/es/index';

 options: DatepickerOptions = {
      minYear: 1970,
      maxYear: 2030,
      displayFormat: 'YYYY-MM-DD',
      barTitleFormat: 'YYYY-MM',
      firstCalendarDay: 0, // 0 - Sunday, 1 - Monday
      locale:cnLocale,
    };

For available format options check out here. For available locale options check out here

Run Included Demo

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

Licence

MIT

ng2-3datepicker

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages