ng-range-calendar
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

NgRangeCalendar

npm version Build Status

NgRangeCalendar is a library based on SaturnDatepicker and Angular Material Datepicker

ShortScreen

Dependence

Your project must install

npm i -S @angular/animations@^5.2.4 @angular/cdk@^5.2.4 @angular/material-moment-adapter@^6.2.1 moment

Install

 
npm i ng-range-calendar -S
 

Basic Usage

import { NgRangeCalendarModule } from './modules/ng-range-calendar/ng-range-calendar.module';
 
@NgModule({
  imports: [
    NgRangeCalendarModule,
    
    // ...
  ],
  
  // ...
})

Localize

Eg: Japanese Calendar

import { MAT_DATE_LOCALE } from '@angular/material/core';
 
@NgModule({
  providers: [
      {provide: MAT_DATE_LOCALE, useValue: 'ja-JP'},
  ],
})

Format

We can define display format look like this:

import { MAT_DATE_FORMATS } from '@angular/material/core';
 
export const MY_FORMATS = {
    parse: {
        dateInput: 'MM/YYYY',
    },
    display: {
        dateInput: 'MM/YYYY',
        monthYearLabel: 'MMM YYYY',
        dateA11yLabel: 'LL',
        monthYearA11yLabel: 'MMMM YYYY',
    },
};
 
@NgModule({
  providers: [
      {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS},
  ],
})

Running the Sample

 
git clone https://github.com/hungnt167/ng-range-calendar
cd ng-range-calendar
npm i
npm start
 
 

Cheer :v

Package Sidebar

Install

npm i ng-range-calendar

Weekly Downloads

0

Version

0.0.10

License

MIT

Unpacked Size

2.71 MB

Total Files

69

Last publish

Collaborators

  • hung1996hy